Hacker News new | ask | show | jobs
by littlestymaar 665 days ago
Committing stuff to the repo means work for other people (namely the reviewers).

And to find the answer to “why is it a problem that there's a .sublimetext line in the .gitignore” then ask yourself the question “why is it a problem if there's a .sublimetext file committed to the repository”. Why even bothering to add it to the .gitignore when you can just commit the file?

Why do you think the second scenario is an issue and not the first?

2 comments

Because a dev's IDE project file can differ between every other dev, so committing it doesn't make sense. On the other hand, adding it to the .gitignore solves the problem of having differing config files.
But why is a “config file” (which is usually no more than a few dozen bytes) a problem? If you agree to add the name of the file in your .gitignore, why do you even bother to ignore it in the first place. It pollutes the .gitignore file as much as it pollutes the root directory…
The first issue helps to prevent the second issue.

Many projects will need to have a .gitignore to ignore build files or package artifacts. Adding to an existing file is preferable to adding additional files.

Adding IDE level configs can override config files for other developers. The .gitignore does not have this negative impact on others.

But adding it to the developer's machine is preferable to both!