The global excludes file is configured in core.excludesFile
.
How can I easily edit this file?
The global excludes file is configured in core.excludesFile
.
How can I easily edit this file?
It's not as simple as it sounds.
If you have set:
excludesFile = ~/.config/git/ignore
Then you have the issue of manually expanding the ~
character, which isn't as easy as you'd hope.
The following alias will do the magic for you:
edit-global-excludes = !"bash -c 'f=$(git config core.excludesFile); \"$EDITOR\" \"${f/#\\~/$HOME}\"' #"
This is equivalent to typing at the shell prompt:
$ bash -c 'f=$(git config core.excludesFile); "$EDITOR" "${f/#\~/$HOME}"' #