This seems like bad advice. I've very rarely committed extra files by accident, but I would 100% forget to unignore files I meant to commit. If you're doing an initial setup step to gitignore everything, why not just do an initial setup step to gitignore the usual files? Make a template that you copy into all of your repos.
.gitignore Everything by Default
41–50 of 185 posts
Re: .gitignore Everything by Default
#42I'd incrementally add files until the project would load successfully after a fresh clone. Handling of subsequent concerns like lightmap data and external services became a lot easier having had the experience built up from zero.
Re: .gitignore Everything by Default
#43I don’t ignore by default, but only stage the items I explicitly want. I can’t tell you how many times I’ve been pairing with someone when they just say “git add .”, I’m always confused by that choice. I get it, but I’ve seen more problems arise from adding all than being consistently selective. To each their own.
Re: .gitignore Everything by Default
#44- or you could stop scratching your head so hard and actually use the gitignore templates for every programming language officially recommended by github itself - https://github.com/github/gitignore - funny how I did not see a single comment talk about this
Re: .gitignore Everything by Default
#45Earlier quoted context omitted.
I use "git add ." (or rather -A), but I will always do a "git status" first to make sure I'm not doing something silly. Of course you still have to be careful about subdirectories, which is why I usually also do a "git status" again before committing.
another `git status` then `git add .` folk here, it's a quick sanity check and then quicker and frankly it's just the habit I got into when I first started using git. I've never managed to get on with any UI for basic git tasks, they always end up been slower.
Re: .gitignore Everything by Default
#46…is what I would say if I had no filter. But it does make sense what I see in PRs sometimes - have you proofread any of this before pushing?
Re: .gitignore Everything by Default
#47This seems like bad advice. I've very rarely committed extra files by accident, but I would 100% forget to unignore files I meant to commit. If you're doing an initial setup step to gitignore everything, why not just do an initial setup step to gitignore the usual files? Make a template that you copy into all of your repos.
Re: .gitignore Everything by Default
#48Re: .gitignore Everything by Default
#49You should have editor specific and platform specific files in your global gitignore. https://codeberg.org/ziglang/zig/src/branch/master/.gitignor... That fixes the problem of every project enumerating the settings files for every editor. Then, as others have said, you should commit only the files you intend to commit; and ignore the files that you don’t intend to commit. This shouldn’t be difficult if you’re reviewi…
Re: .gitignore Everything by Default
#50This seems like bad advice. I've very rarely committed extra files by accident, but I would 100% forget to unignore files I meant to commit. If you're doing an initial setup step to gitignore everything, why not just do an initial setup step to gitignore the usual files? Make a template that you copy into all of your repos.