Global gitignore
To enable a global .gitignore for a specific user you can use the git config core.excludefiles as in:
git config --global core.excludesfile '~/.gitignore'
This will make the .gitignore in your home folder to be used in every git project in adition to local .gitignore files.
For more info read the git documentation on gitignore
Written on February 7, 2017 by diogobiazus