this post was submitted on 11 Feb 2026
58 points (95.3% liked)
Programming
26565 readers
363 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Global gitignore is for idiosyncrasies of your computer, not for repo-specific stuff. For example if you use an editor that writes in-place backup or swap files (like
.swpfiles with Vim's default settings), or you're on a Mac which writes.DS_Storefiles into every directory, you're going to want those ignored for every repo. That way you can comfortably work with other people's repos, even if they're not configured for your particular setup.The global ignore combines with gitignore files in each repo. So if it's an ignore pattern that everyone working with that repo should have, put it in the repo.