Skip to content

Commit de1b5a6

Browse files
committed
Document alternative config file location and include technique
1 parent b1f34a8 commit de1b5a6

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Diff for: manual/src/configuration.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Git config file
44

5-
The most convenient way to configure delta is with a `[delta]` section in `~/.gitconfig`. Here's an example:
5+
Delta uses [git config](https://git-scm.com/docs/git-config#_configuration_file) (`~/.gitconfig`) for its configuration. Here's an example:
66

77
<sub>
88

@@ -21,6 +21,20 @@ The most convenient way to configure delta is with a `[delta]` section in `~/.gi
2121
conflictstyle = zdiff3
2222
```
2323

24+
You do not even need to use git -- delta accepts `git diff` and unified diff formats and hence works with e.g. mercurial and jujutsu -- but you do need to use the git config format.
25+
26+
If you want to store your delta config at a different location, use [[git docs](https://git-scm.com/docs/git-config#Documentation/git-config.txt-GITCONFIGGLOBAL)]
27+
```bash
28+
export GIT_CONFIG_GLOBAL=/path/to/my/delta/config
29+
```
30+
31+
If you want to keep your delta and git config separate, use [[git docs](https://git-scm.com/docs/git-config#_includes)]
32+
```gitconfig
33+
[include]
34+
path = ~/src/devenv/dotfiles/delta/delta.gitconfig
35+
```
36+
37+
2438
</sub>
2539

2640
Use `delta --help` to see all the available options.

0 commit comments

Comments
 (0)