How to create a global .gitignore file
Lets say for example you and your colleagues use different IDE's for development.
You use PHPStorm and your colleague uses Netbeans. You want to avoid having project settings for these IDE's in your GIT repository.
This is where setting up a global .gitignore file on your computer comes in handy.
On a mac you would open your terminal and execute the following:
and then insert the desired files to the .gitignore file you are about to create/edit.
#.DS_Store .DS\_Store .DS_Store #Netbeans related nbproject nbproject/* #PHPStorm related .idea/*;
Now all we have to do is tell git where our global gitignore file lives:
git config --global core.excludesfile '~/.gitignore'
Et voilà! You now have a global .gitignore file that you can keep on tweaking.