
on December 24, 2020
Global .gitignore
git1 min read
Instead of adding platform-specific files like .DS_Store to .gitignore file of every single project, you can just create a global .gitignore file.
To do that, first create a new .gitignore file on the root (or wherever you want):
touch ~/.gitignoreAdd the files you don’t want to track to it:
echo .DS_Store >> ~/.gitignoreFinally tell introduce your global .gitignore file to git:
git config --global core.excludesfile ~/.gitignoreMentions
2 replies, 1 likes
Gokhan Sari replied
Upcoming: How to convince your colleagues to add .DS_Store to their global .gitignore.
wunnle replied
Step 1: Buy a Nerf gun