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?
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.
How can any coder or engineer or admin or tech of any stripe ask such a question?
The problem is not that babies will die.
Yet just because no babies will die and we can afford the disk space and it doesn't slow down the performance does not mean there is no reason.
What's the problem in placing 50,000 redundant copies of 2,000 lines of config in every individual repo? Where to begin?
1 - my project has a particular kind of file I need to ignore. I either have to add it to the bottom of this huge file blindly, or I have to search the file every time before adding something, in case it's already in there somewhere.
2 - my project is mysteriously not working as expected because I didn't realize that somewhere in the huge mass of everyone else's ignores in the world that MY project has in it, there are some patterns that affect files I didn't expect or ask for and didn't realize I would have to specially override.
3 - the idea doesn't scale because the world is big and essentially every file name pattern needs to be ignored by someone somewhere, so if all possible ignores were copied to every repo, every file would be ignored in every repo. In that case we should not have gitignore, we should have gitinclude. If you think the answer to this is "just pick the common things" then you just broke your own theory that everything should be copied to all.
4 - If every repo has it's own copy of the database of all ignores, then every repo has it's own out of sync copy.
If it doesn't matter that it goes out of sync, then it doesn't matter if it's in there at all in the first place. If it does matter, then how is it kept up to date?
I have edited the stock initial copy with the stuff that's particular to my project. Shall we have git itself always doing a little side git operation just on this file against a central public reference every time? So every git add/status/commit etc aside from looking at the local and origin, also checks a special origin just for that file, so that I get a patch that updates my gitignore without simply replacing it?
Maybe we split gitignore into 2 parts, a shared common global part and a project-specific part? Wow, what a great idea, why didn't git already work that way by default all along?
5 - Why stop at just one stupid copy of a database of stuff that doesn't apply per repo? If there is no harm in a redundant out of sync copy per repo, then there is no harm in a redundant out of sync copy per directory. "what's the problem?" Seriously what is the problem? Because it is the same exact answer for the repo as for the directory.
This question is ridiculous unless you are new and have never tried to use any tools yet and are still unaware of even the most basic engineering principles in general, about anything not just git or software development.
In that case, that is fair and everyone starts out as a child that has to find out everything the first time somehow. In that case the answer is "go ahead and see how it goes" because for some things if you don't understand the problem just by thinking about it and projecting implications for about 2 seconds, then no mere explaination will be convincing. Nothing I've said here was convincing right? You will just have to find out by being stupid for a while and actually run into all the little paper cuts in order to recognize that they exist and they suck and what the totally simple and obvious ways to avoid them are.
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?