You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,10 @@ You can do one-off fanciness:
19
19
git diff --color | diff-so-fancy
20
20
```
21
21
22
-
**But**, you'll probably want to fancify all your diffs. Run this so `git diff` will use it:
22
+
**But**, you'll probably want to fancify all your diffs. Run this so `git diff`and `git show`will use it:
23
23
```shell
24
-
git config --global core.pager "diff-so-fancy | less --tabs=1,5 -R"
24
+
git config --global pager.diff "diff-so-fancy | less --tabs=1,5 -R"
25
+
git config --global pager.show "diff-so-fancy | less --tabs=1,5 -R"
25
26
```
26
27
27
28
Or, create a git alias in your `~/.gitconfig` for shorthand fanciness:
@@ -44,7 +45,7 @@ If you want, you can choose to install manually:
44
45
* Grab the two scripts (`diff-highlight` and `diff-so-fancy`) via either downloading or cloning the repo.
45
46
* If you download `diff-highlight` from the official git repo, make sure it's executable.
46
47
* Symlink or place them in a location that is in your `PATH`.
47
-
* Set up the git `core.pager` config, as described above.
48
+
* Set up the git `pager.diff` and `pager.show` configs, as described above.
48
49
49
50
Note: The `diff-highlight` dependency is an [official git-contrib script](https://github.com/git/git/tree/master/contrib/diff-highlight), duplicated here for convenience. If you prefer less fancy in your diff, you also use diff-highlight [on it's own](https://news.ycombinator.com/item?id=11068436).
50
51
@@ -68,10 +69,10 @@ You may also want to configure [general diff colors](https://github.com/pauliris
68
69
69
70
## Opting-out
70
71
71
-
Sometimes you will want to bypass diff-so-fancy. Easy enough:
72
+
Sometimes you will want to bypass diff-so-fancy. Use `--no-pager` for that:
0 commit comments