A global .gitignore file

suggest change

To have Git ignore certain files across all repositories you can create a global .gitignore with the following command in your terminal or command prompt:

git config --global core.excludesfile <Path_To_Global_gitignore_file>

Git will now use this in addition to each repository’s own .gitignore file. Rules for this are:

This file is a good place to keep platform, machine, or user specific ignores, e.g. OS X .DS_Store, Windows Thumbs.db, or Vim *.ext~ and *.ext.swp ignores if you don’t want to keep those in the repository. So one team member working on OS X can ignore .DS_Store and _MACOSX (which is actually useless), while another team member on Windows can ignore Thumbs.db

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents