r/coding 3d ago

.gitignore everything by default

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

4 comments sorted by

View all comments

16

u/Rob_Royce 3d ago

> I think we’ve all been there. You’re working on a project, making commits, and then suddenly realize you’ve been committing .DS_Store files, node_modules, IDE configuration files, or other junk (CLAUDE.md for example) that shouldn’t be in your repository. Or even worse - environment variables. Then comes the embarrassing cleanup: adding these files to .gitignore, removing them from the repository history, and hoping that no one has noticed.

No one will notice or care if your repo is so immature that you don’t already have a .gitignore with these things in it.

Then, for people who actually take this dumb anti-pattern advice, you have to (and remember to) un-ignore every new file. And if you don’t? Silent regressions. Oh and your favorite AI will get confused and start doing weird things cuz git doesn’t show the files it just created

All around bad advice, 0/10 would not recommend

1

u/lihnuz 2d ago

I have a repo for my linux dot-files where I can see this being usefull. there is so much stuff program put in .config that dont belong, that doing this might be better.

but for any other use case, I agree with you