this post was submitted on 11 Feb 2026
58 points (95.3% liked)

Programming

26565 readers
333 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
[–] JakenVeina@midwest.social 15 points 2 months ago (5 children)

Anyone else dislike the idea? Like, having ignore patterns be ported automatically to everyone that wants to clone the repo just seems.... always better than making people do it themselves. At basically no cost.

[–] CombatWombatEsq@lemmy.world 12 points 2 months ago (2 children)

I really like the global gitignore. I get annoyed when people check in files that are specific to their particular text editor, so I recommend to new contributors adding anything that is specific to their IDE or text editor to their global gitignore so I don’t have to have a bunch of vim and emacs and vs code and atom and webstorm and who even knows what other stuff in my project gitignore.

[–] JakenVeina@midwest.social 8 points 2 months ago

shrug To each their own, I guess.

I can definitely appreciate that opinion, I just... disagree. I don't really give 2 shits about a file having some stuff in it that I don't personally use, so long as it still has a purpose. I.E. I'll take a little clutter in a file like that, that basically never gets looked at or edited, over the chance of cluttering up the repo itself, or PRs, or history with stuff that has no purpose at all.

[–] Jayjader@jlai.lu 5 points 2 months ago (2 children)

I have the same preference for personal projects, but when I was working on a corporate team it was really useful to have the "run configs" for intellij checked in so that each new team member didn't need to set them up by themselves. Some of the setup needed to get the python debugger properly connected to the project could get quite gnarly.

[–] hallettj@leminal.space 2 points 2 months ago

Gitignore settings don't prevent checking in run configs if that's what you want to do. Even if someone has the run configs pattern ignored, they'll get those files with the repo clone. Gitignore only prevents adding files that aren't already checked in - it's a guard rail to prevent accidentally checking in so something you don't want. You can override ignore settings to check in something new in with git add --force <filename>

[–] CombatWombatEsq@lemmy.world 2 points 2 months ago

+1 for checking in your config when you can mandate everyone uses the same tool chain. My point is more that the existence of global gitignore supports my open-source use case without precluding your corporate use case.

[–] hallettj@leminal.space 11 points 2 months ago

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 .swp files with Vim's default settings), or you're on a Mac which writes .DS_Store files 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.

[–] olafurp@lemmy.world 4 points 2 months ago

I actually like it a lot for stuff that is user specific, not repo specific. I imagine someone could have a "build.log" to view the build output in some specific way that hooks up to a mini taskbar app or some other random shit.

I've personally added some files that don't relate to the project at all and has no reason for being inside a .gitignore and I've had to add it many times.

[–] MonkderVierte@lemmy.zip 2 points 2 months ago

It's not set by default i think?

If you're contributing to a larger project, it might not be trivial to modify the .gitignore file, because you might have to go through a review process and so on. It might be easier to just ignore something locally.