r/Backend • • 6d ago

.gitignore everything by default

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

3 comments sorted by

2

u/Careful-Emu-8965 4d ago

what problem are you trying to solve with this? if its preventing accidental secret commits, pre-commit hooks are usually way less painful than maintaining an explicit allowlist of every valid file.

2

u/nihillistic_raccoon 4d ago

https://www.reddit.com/r/coding/s/LCKoWW85Kg

Please don't recycle your content, this is not exactly some high quality shit that world needs to know

1

u/Discordbothost 6d ago

With an allowlist, a new source file can sit on your machine and never make it into the commit. If a file is missing from git status, try git check-ignore -v -- path/to/file. It'll show the rule that matched, which is handy when the rule is excluding a parent directory.