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. OSX .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 add all .DS_STORE and _MACOSX (which is actually useless), while another team member on Windows can ignore all thumbs.bd

Feedback about page:

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

Table Of Contents