I'd rather enforce it at the repo then hope and pray everyone updates their global configs. Easy enough to catch but you'll miss some. Literally no cost to adding it to repo config either
Stop Using Git Ignore
31–40 of 72 posts
Re: Stop Using Git Ignore
#32Strong disagree. Please do continue trying to educate the community, but that's no reason to take the guardrails off.
Re: Stop Using Git Ignore
#33Earlier quoted context omitted.
Thank you for the detailed feedback, I really appreciate you taking the time and effort. Yes the title is a little bit controversial
Thanks for taking the time to write the article! We need more people sharing their good ideas like this.
Re: Stop Using Git Ignore
#34Not me, never heard of it.
I use ./.git/info/exclude to bypass commits and pushes, that is good enough for me.
Quickly reading the title, I though it was about stop using git period, go to something else :)
Re: Stop Using Git Ignore
#35> As a maintainer, don’t fall into the trap of putting every possible exclusion into the repo’s git ignore. This really is a “sticky plaster” approach in my view. What we should try to do is up-skill and educate the community, so it benefits everyone in the long run. Strong disagree. Please do continue trying to educate the community, but that's no reason to take the guardrails off.
From my experience the main downside of keeping the "guardrails on", people are less likely to learn about the importance of git global ignore and also with open source projects there can be a green square chasing game (which we also need to educate people on) - just thinking about this, more Pull Requests will come in with unwanted files though, which will be painful for contributors and maintainers, but could be a good lesson?
Re: Stop Using Git Ignore
#36Ignoring .env files globally could prevent some mistakes.. :D
Re: Stop Using Git Ignore
#37Use the repo’s ignore, not your own.
Re: Stop Using Git Ignore
#38not sure I agree with the article or not, just wanted to state there's a third option: you can define your ignore rules per project but not necessarily share the, by putting the ignore rules in: .git/info/exclude
Re: Stop Using Git Ignore
#39Disagree. Many projects may want to commit IDE files. Ignoring them globally is simply wrong.
Once they're committed into the repository, they're no longer ignored, so what's the problem? The IDE files being listed in a hypothetical developer's global .gitignore do no harm in this case.
IMHO the .gitignore should be the source of truth.
Re: Stop Using Git Ignore
#40> As a maintainer, don’t fall into the trap of putting every possible exclusion into the repo’s git ignore. This really is a “sticky plaster” approach in my view. What we should try to do is up-skill and educate the community, so it benefits everyone in the long run. Strong disagree. Please do continue trying to educate the community, but that's no reason to take the guardrails off.
Thank you for reading and commenting. It is great to understand different people's perspectives. From my experience the main downside of keeping the "guardrails on", people are less likely to learn about the importance of git global ignore and also with open source projects there can be a green square chasing game (which we also need to educate people on) - just thinking about this, more Pull Requests will come in wi…