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.
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.
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.
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.
+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.
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>
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.
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.
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.
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.
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.
+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.
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>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.