Skip to content

Git Global Ignore

Joel Meador edited this page Jun 8, 2026 · 1 revision

How do I ensure that no pointless files get committed by me in git?

Use git global ignore file!

touch ~/.gitignore

Edit ~/.gitignore in your editor of choice, but vim ~/.gitignore would be easy

Make it look like this:

.DS_Store
.vegas/
*.orig
.byebug_history
.vscode
Thumbs.db
.idea
*.log
tmp/

Add other things you think you might generate that shouldn't be committed ever.

Run this git config --global core.excludesfile ~/.gitignore

Home

TODO: can we recreate the tag system here roughly with sections about certain subjects?

Clone this wiki locally