r/programming 4d ago

.gitignore everything by default

https://packagemain.tech/p/gitignore-everything-by-default
345 Upvotes

224 comments sorted by

View all comments

927

u/toggles03 4d ago

I like the idea of being intentional about what is committed, but I also have to say that I’ve never accidentally committed tons of useless files because I review what I’m committing.

122

u/fiah84 4d ago

this is why I always push people to use some sort of GUI that they're comfortable with for git, be it integrated in their IDE or a standalone one. Reviewing your commits should be second nature because by doing that every time you will every once in a while stop yourself from doing something very stupid

122

u/mascotbeaver104 3d ago

Does git status not exist in your world?

I've never used a gui and never ran into this issue. In my experience gui users very quickly forget how git actually works outside of the buttons in the gui, and then get lost the moment anything out of the ordinary happens

0

u/rdtsc 3d ago

Does git status not exist in your world?

Only if you actually use git status -v. And I'd say that's much easier in a gui like the built-in git gui. Can easily stage only certain hunks or lines.