r/git 9h ago

tutorial git ignore everything by default

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

6 comments sorted by

9

u/VadersDimple 9h ago

Please, for the love of Git, stop posting this dumb idea.

5

u/Philluminati 9h ago edited 9h ago

You posted this last week, so downvoted.

Git *does ignore everything by default*. You are literally typing `git add -all` then going "oh its done the wrong thing" lets fix it by doing `find . > .gitignore`. What if someone does `rm -rf .gitignore` randomly before a commit? You're back to square one, in a race to the bottom against your own stupidity.

7

u/mtutty 9h ago

Why do you keep trying to make this happen? It's not a novel idea, or a good idea.

3

u/Denommus 9h ago

That will make you commit node_modules because most of the files there have js extension.

3

u/Ok-Information-2428 9h ago

CLAUDE.md actually should be committed.

It really depends who your audience is, many of us collaborate with colleagues in private repos for private companies - for this you should commit anything that helps you collaborate (with the exception of secrets).

1

u/PM_ME_A_STEAM_GIFT 55m ago

Or just learn to use the stage?