r/opensource • • 8d ago

Discussion .gitignore everything by default

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

9 comments sorted by

21

u/andful 8d ago

.gitignore is for every developer in the repo. I find it a bit asocial to impose that to everyone. If some people prefer this methodology that is fine, but then use .git/info/exclude.

10

u/ClikeX 8d ago

I’ve set up a global gitignore to ignore some core things like DS_store.

→ More replies (1)

20

u/LutimoDancer3459 8d ago

Imagine doing some bigger changes and then forgetting to commit some files because they dont show up anywhere as changed because you ignored everything.

12

u/SubwayGuy85 8d ago

so many llm brainfarts turning into code these days

15

u/eveningcandles 8d ago

Huge maintenance liability

Over the course of a project the set of things to allow is much larger and prone to change than the set of things to disallow

7

u/chkno 8d ago

I've much more often forgotten to git add new files than accidentally committed unintended files.

That said, a pre-commit hook that runs your tests works pretty well for guarding against forgetting to add files but does not guard against accidentally committing unintended files.

4

u/_5er_ 8d ago
  1. git commit .
  2. git is so stupid, it includes all my changes, there much be a better way
  3. git ignore all 🙃

1

u/rowrowrowmyboat22 7d ago

I just, I just can’t … we should just all give up now