DEV Community

Discussion on: How should you ignore files for just you in git?

Collapse
 
dotproto profile image
Simeon Vincent • Edited

If you commonly create files that you don't want to commit to any of your projects, you can also create a global ignore file.

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

For example, say you're on a Mac and you want to make sure you never commit the .DS_Store files generated by your OS, you could run the below command to add an ignore rule to your global list.

$ echo ".DS_Store" >> ~/.gitignore_global