# What about Git Diff Highlighting

> On the next few lines, you will discover different git diff output that may enhance readability.

Source: https://antistatique.net/en/blog/what-about-git-diff-highlighting

Category: Development

# What about Git Diff Highlighting

Author(s)

[

![Kevin](https://images.statique.ch/t/w_750,h_750,c_fill,f_jpeg,q_70/wp/app/uploads/2020/12/Kevin-300x300.jpg)



](/en/agence/kevin)

[Kevin](/en/agence/kevin)9 September 2022

The setup instructions in this article are for Mac, but you should be able to do this on Linux and Windows Subsystem for Linux.

I prefer using **git** from the CLI (Command Line Interface), but sometimes a GUI (Graphic User Interface) does a better job with specific tasks. **Diff highlighting** is for sure one of them.

Many devs consider mastering the Git CLI a feat of experience and skill. They are extremely proud, and protective, of their CLI fluency. 🥷🏻

> “ 🎶 https://open.spotify.com/track/4o3B718MLAePzaSUcj8pR8?si=8557205081ac4af2 ”
> 
> Sofi Tukker
> 
> Fuck They

For some devs, it’s downright romantic 🌹 the command line interface offers an intimate experience with your computer. It’s like having a back-and-forth conversation with your machine.

![The boot sequence of Samantha OS on the movie &quot;Her&quot;](https://images.statique.ch/t/wp/app/uploads/2022/09/samantha.gif)

The boot sequence of Samantha OS on the movie “Her”

Know what ? Use the tool you are more confident with. For myself, I prefer using the CLI because I’m used too and I’m way too lazy to learn a new GUI for managing my commits, period.

In this article I will not try to convince you to operate git from your CLI or GUI. On the next few lines, you will discover different `git diff` output that may enhance readability.

Let’s dive 🤿.

\---

I heavily rely on the **git diff** **highlighting features**, like every time.  
I faced the **git diff highlighting** when I’m verifying changes before a commit (`git add -p`), when I review commits (`git show`& `git logs`) or when I’m finding bugs introduced between two commits (`git bisect`).  
And to be franc, the default `git diff` output can be a little inconvenient. It can throw a lot of information at the screen at once.

what git diff normally shows you

I know this is completely unreadable. Believe me you can highly improve the output readability with one of the twofollowing tools:

-   diff-so-fancy
-   diff-delta

Let’s see both of them in action 🍿

## diff-so-fancy

The project `diff-so-fancy` is a tool to make git diff more readable. Err… more fancy!

```
brew install diff-so-fancy
```

Configure **git** to use `diff-so-fancy` for all diff output

```
git config --global interactive.diffFilter "diff-so-fancy --patch"
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
git config --global pager.show "diff-so-fancy | less --tabs=1,5 -RFX"
```

Improved colors for the highlighted bits

```
git config --global color.ui true

git config --global color.diff-highlight.oldNormal    "red bold"
git config --global color.diff-highlight.oldHighlight "red bold 52"
git config --global color.diff-highlight.newNormal    "green bold"
git config --global color.diff-highlight.newHighlight "green bold 22"

git config --global color.diff.meta       "11"
git config --global color.diff.frag       "magenta bold"
git config --global color.diff.func       "146 bold"
git config --global color.diff.commit     "yellow bold"
git config --global color.diff.old        "red bold"
git config --global color.diff.new        "green bold"
git config --global color.diff.whitespace "red reverse"
```

what git diff using diff-so-fancy will shows you

## delta

The delta tool (a.k.a. `git-delta` or `delta-diff`) is a diff viewer written in Rust 💪.   
Initially made to have a better Developer Experience using the `git diff` command, but has evolved enough transcending a simple diff for git.

```
brew install git-delta
```

Configure **git** to use `delta` for all diff output

```
git config --global interactive.diffFilter "delta --color-only --features=interactive"
git config --global core.pager "delta"
```

Improved colors for the highlighted bits

```
[delta]
    features = decorations
    navigate = true
    light = false
    minus-style                   = bold red
    minus-non-emph-style          = bold red
    minus-emph-style              = bold reverse red
    minus-empty-line-marker-style = normal "#3f0001"
    plus-style                    = bold green
    plus-non-emph-style           = bold green
    plus-emph-style               = bold reverse green

[delta "interactive"]
    keep-plus-minus-markers = false

[delta "decorations"]
    commit-decoration-style = bold yellow box ul
    file-style = bold yellow ul
    file-decoration-style = none
    hunk-header-decoration-style = cyan box ul
```

what git diff using diff-delta will shows you

## Sources

For the most curious of you, here are some sources of additional information that inspired the creation of this article.

**Max Smolin** (Sept, 2020). Improving Git Diffs.  
[https://maximsmol.medium.com/improving-git-diffs](https://maximsmol.medium.com/improving-git-diffs-4519a6541cd1)

**So Fancy** (Sept, 2022). Repository of diff-so-fancy.  
[https://github.com/so-fancy/diff-so-fancy](https://github.com/so-fancy/diff-so-fancy)

**Dan Davison** (Sept, 2022). Repository of diff-delta.  
[https://github.com/dandavison/delta](https://github.com/dandavison/delta)

**Rafael Mendiola** (Apr, 2020). Better git diffs with FZF.  
[https://medium.com/@GroundControl/better-git-diffs-with-fzf](https://medium.com/@GroundControl/better-git-diffs-with-fzf-89083739a9cb)

**Chris Jones** (Feb, 2016). Dress Up Your Git Diffs With Word-level Highlights.  
[https://www.viget.com/…/dress-up-your-git-diffs](https://www.viget.com/articles/dress-up-your-git-diffs-with-word-level-highlights/)

**Joel Clermont** (Feb, 2021) Better Diff Highlighting in Git.  
[https://joelclermont.com/post/2021-02/better-diff-highlighting-in-git/](https://joelclermont.com/post/2021-02/better-diff-highlighting-in-git/)

## More articles

Author(s)

[

![Anthony](https://images.statique.ch/t/w_750,h_750,c_fill,f_jpeg,q_70/wp/app/uploads/2024/11/anthony-1-300x300.png)



](/en/agence/anthony-salamone)

[Anthony](/en/agence/anthony-salamone)28 September 2026

### [Smashing Conference Freiburg 2026](/en/blog/smashing-conference-freiburg-2026)

Back in Freiburg for Smashing Conference 2026: AI and design systems, deeply technical CSS and HTML, and more human talks about teams and mindset. Here's what we took away.

Back in Freiburg for Smashing Conference 2026: AI and design systems, deeply technical CSS and HTML, and more human talks about teams and mindset. Here's what we took away.

[

![Smashing Conference Freiburg 2026 poster](https://images.statique.ch/t/w_750,h_500,c_fill,f_jpeg,q_70/assets/blog/smashing-2026.png)



](/en/blog/smashing-conference-freiburg-2026)

Author(s)

[

![Akira](https://images.statique.ch/t/w_750,h_750,c_fill,f_jpeg,q_70/wp/app/uploads/2025/03/akira-small-300x300.jpg)



](/en/agence/akira-kamata)

[Akira](/en/agence/akira-kamata)22 July 2026

### [Making of : “La nuit des Losers”](/en/blog/making-of-la-nuit-des-losers)

lanuitdeslosers.ch, built fast: paper wireframes, a bold hand-drawn identity, then Claude Code to prototype and ship. A mouse-tracking hero animation, a bowling game made of sponsor logos, and a few bugs we’re keeping.

lanuitdeslosers.ch, built fast: paper wireframes, a bold hand-drawn identity, then Claude Code to prototype and ship. A mouse-tracking hero animation, a bowling game made of sponsor logos, and a few bugs we’re keeping.

[

![Making of : “La nuit des Losers”](https://images.statique.ch/t/w_750,h_500,c_fill,f_jpeg,q_70/wp/app/uploads/2026/05/La-nuit-des-Losers-Teaser-1-768x576.png)



](/en/blog/making-of-la-nuit-des-losers)

Author(s)

[

![Pierre](https://images.statique.ch/t/w_750,h_750,c_fill,f_jpeg,q_70/wp/app/uploads/2020/12/Pierre-300x300.jpg)



](/en/agence/pierre)

[Pierre](/en/agence/pierre)7 July 2026

### [Dark mode: necessity or trend](/en/blog/dark-mode-necessity-or-trend)

Nous faisons le tri entre idées reçues, réalités techniques et bonnes pratiques de design.

Nous faisons le tri entre idées reçues, réalités techniques et bonnes pratiques de design.

[

![Dark mode: necessity or trend](https://images.statique.ch/t/w_750,h_500,c_fill,f_jpeg,q_70/wp/app/uploads/2026/07/1-768x384.png)



](/en/blog/dark-mode-necessity-or-trend)
