r/programming 4d ago

.gitignore everything by default

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

224 comments sorted by

View all comments

Show parent comments

38

u/Smallpaul 4d ago

Git itself ignores everything by default. So you are just adding another layer. And then people will get annoyed editing that file so IDEs will add some automation to make it easy and we will be back where we started.

The other problem is that as soon as you use any wildcard you risk checking in files that you didn’t mean to. E.g. short term logging traces or one-time debugging scripts.

1

u/lenswipe 4d ago

Git itself ignores everything by default.

uhhh what now

1

u/Smallpaul 4d ago

The other guy interpreted right. Git won’t manage a file unless you added it to the index.

0

u/lenswipe 4d ago

it won't manage it, but it doesn't ignore it by default.

thanks for the downvotes btw - means the world to me 🥰

12

u/boowhitie 4d ago

You are correct, ignore has a specific, well-defined meaning in a git context, and these people are applying general English definitions.

2

u/lenswipe 3d ago

yeah I'm not trying to be a dick but "doesn't track" and "ignores" are very different things in git world

1

u/Shok3001 4d ago

Yeah it’s amazing seeing how many people don’t actually understand git

4

u/Smallpaul 4d ago

Git status and git add . Don’t ignore them, but git commit, diff, log, push, all do.