For per-user gitignore, one can set the following config in ~/.gitconfig:
# System-wide gitignore file
# To avoid in-repo repetition for system-specifc garbage files
[core]
excludesfile = ~/.config/git/gitignore
Then your file at ~/.config/git/gitignore can be a normal format, and not need to be stored in repo.
Perfect for system files (.DS_Store...) or editor swap files etc.
Comments
Yes-anding this to say:
For per-user gitignore, one can set the following config in ~/.gitconfig:
Then your file at ~/.config/git/gitignore can be a normal format, and not need to be stored in repo. Perfect for system files (.DS_Store...) or editor swap files etc.Git will per default read ~/.config/git/ignore No need to configure it :)
great tip!