Skip to content
GitHub's Octocat logo

Global .gitignore

Friday, 6 August 2021

At 72 words, this article should take about 19 seconds to read.

This article is more than a year old and the information in it may be out of date.

Unfortunately, this has happened to the best of us at some point, amirite?!

Screenshot of GitKraken showing a new git ignore file and 30,383 deleted files in the node modules folder

Inspired by this monstrosity, I decided to do some investigation!

Here is how to create a global .gitignore file to define a list of rules for ignoring files in every single Git repository on your computer…


  touch ~/.gitignore_global
  echo node_modules >> ~/.gitignore_global
  echo .DS_Store >> ~/.gitignore_global
  echo .vscode >> ~/.gitignore_global
  git config --global core.excludesfile ~/.gitignore_global

For more handy git tips: RTFM 😉

Cover image courtesy of Roman Synkevych.


Fin

Comments

In almost all cases, the comments section is a vile cesspool of Reply Guys, racists, and bots.

I don't want to have to deal with that kind of hell so I don't have a comments section.

If you want to continue the conversation, you can always hit me up on Mastodon (which is not a vile cesspool of Reply Guys, racists, and bots).

Thomas Rigby

Thomas Rigby

When I'm not building things for the internet, I take photos of stuff.

Pronouns: he/him/his

Real. Simple. Syndication.

Get my latest content in your favorite RSS reader. I use InoReader but you don't have to.

What even is an RSS feed?!

Subscribe

Last played

Burn the Bitch

Ulver || Svidd Neger

Listen
Loading Invisible Visible RSS Navigation Close Arrow Info Online Online