I want to ignore a path in several .git repos, but I don't want to make this global configuration. Say I have this:
projects/
foo/
.git/
conf/
bar/
.git/
conf/
baz/
.git/
conf/
for all the projects in projects/ I want to ignore any changes to the conf folder. Is there a way to do this with
$ git config
Because this is a work thing and I share stuff with other devs, I don't want to modify the .gitignore files in each project. I need local settings only.
According to the gitignore manual Git searches for patterns in
.gitignore files,$GIT_DIR/info/exclude (local, not committed)git config core.excludesFile (with $XDG_CONFIG_HOME/git/ignore being the default and ~/.config being the default for the XDG variable).The simplest method therefore would be a global file in ~/.config/git/ignore as longs as other git repositories are not affected. Otherwise you can use $GIT_DIR/info/exclude but have to configure each repository individually.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With