Quick Tip: Keep a Global Gitignore File

Published January 9th, 2020
1 minute read

Have common files you don't want to version in any projects? -- put them in a global gitignore file! I don't know about you, but I'm sick of adding .DS_Store or .vscode to gitignore files on a per-project basis.

Run the following command in your terminal:

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

Now you can edit the ~/.gitignore_global file just like any other, but it will apply everywhere.

Take a look at my global gitignore file to see if any of those would help you.

Enjoy this article? Follow me on Twitter for more tips, articles and links.
😢 Awww, nobody has liked or mentioned this on Twitter yet.

Join the Newsletter ❤️

A most excellent monthly newsletter with code & design tips, curated links and more!
Don't worry, I'll never send you spam. Unsubscribe at any time.