3 ms·
i always have a large pile of temp files and such that should never be committed but it's never been a problem because i never use `git add .` i use `git add -u
by masukomi 3y ago
i always have a large pile of temp files and such that should never be committed but it's never been a problem because i never use `git add .` i use `git add -u` which is "only add things that are already being tracked"
there's a newer flag for the same thing but my brain is hardcoded to the old "-u" option from "back in the day". It feels like a "simple, out of the box way to do it" to me.
- vdfs 3y agoAdd those files to `.git/info/exclude` and they won't show up in `git status`
- josephg 3y agoI do the same, but in all the mess that git status outputs, I occasionally forget to git add some required source code - which leaves entire chains of commits in my repository in a broken, impossible to compile or run state. Worse, I don’t notice until I try to run the code on another computer - and find I’m missing data. Having a “local gitignore” makes a lot more sense. I’d like to be more explicit about which local files should be ignored.