Hacker News new | ask | show | jobs
by jamiewildehk 3890 days ago
Ahh, but do you then commit your .gitignore file
4 comments

I always do. My company has a canonical .gitignore that we update when we see things in git repos that should not be there. It now contains all of the stupid hidden project directories for all of the major IDEs, build artifacts we don't want, and a bunch of other stuff.

I highly recommend this approach.

Absolutely. .gitignore is a project-level declaration that "these files do not belong in source control". Keeping that in source control not only makes sure everyone gets the same copy, but also allows changes to be annotated by relevant commit messages.
Subtle.
yes?
For our internal projects here we do - it saves is hassle of someone accidentally committing /node_modules or the like into the repo and someone (me) having to sort it out.