Create a global .gitignore file

If you are like me you are probably creating a .gitignore file over and over again for every single¬†project. 90% of these .gitignore files are the same, it’s a waste of time creating¬†these files over and over again.

Recently I discovered you can create a global .gitignore file in your .gitconfig file. You can do that by running this command from your terminal:

git config --global core.excludesfile '~/.gitignore_global'

I named my file .gitignore_global just for clarity but you can name it whatever you want.

You can view my personal global .gitignore file on Github.