Skip to content

Commit

Permalink
Add notes for global git integration
Browse files Browse the repository at this point in the history
  • Loading branch information
xaizek committed Apr 11, 2021
1 parent 487e1d8 commit 3ad3027
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tools/diff/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ GIT_EXTERNAL_DIFF='zs-diff --color' git show --ext-diff

## Integrating into Git ##

### For a single repository ###

Add `zs-diff` as a diff tool to `git` with these lines (`.git/config`):

```config
```gitconfig
[diff "zs-diff"]
command = zs-diff --color
```
Expand All @@ -137,6 +139,13 @@ option to be specified and might require use of an alias.
If parsing or comparison failed for some reason, `git diff --no-ext` will be
called to produce diff so in the worst case a regular diff will be displayed.

### Globally ###

Same as above, but specify attributes in `~/.config/git/attributes` and use one of the following files for configuration:

* `~/.config/git/config`
* `~/.gitconfig`

[zograscope]: ../../README.md

[diff-highlight]: https://github.com/git/git/tree/master/contrib/diff-highlight
Expand Down

0 comments on commit 3ad3027

Please sign in to comment.