From 3ad30272050c8e3aa8ecb35286e2e77de9fc5088 Mon Sep 17 00:00:00 2001 From: xaizek Date: Mon, 12 Apr 2021 01:28:24 +0300 Subject: [PATCH] Add notes for global git integration --- tools/diff/README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/diff/README.md b/tools/diff/README.md index e325ce3..defcfbb 100644 --- a/tools/diff/README.md +++ b/tools/diff/README.md @@ -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 ``` @@ -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