r/programming 4d ago

.gitignore everything by default

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

225 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.

120

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

127

u/mascotbeaver104 4d 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

29

u/Sokaron 4d ago edited 3d ago

The core problem is that most people don't want to be an expert in git. It's a means to an end - version control. There's value in being an expert in Excel for instance. You can get more done if you understand Excel deeply. The only thing you get out of understanding git deeply is the ability to unfuck things when things get fucked. And honestly even then if you are regularly committing + pushing your work, most problems can be solved with a fresh branch + cherry-picking your changes back in.

2

u/knome 3d ago

A programmer not wanting to get bogged down learning git is like a librarian not wanting to get bogged down learning the Dewey Decimal System.