Re:Git ignores .gitignore with .gitignore in .gitignore
by JoshTriplett on Wednesday May 18, 2022 @06:23AM
(#31421041)
I prefer to list individual directories and files in my ~/.gitignore so that I see when new files show up and I can decide whether to ignore them, commit them, or prevent them from getting generated.
[ Parent
| on HN ]
Re:Git ignores .gitignore with .gitignore in .gitignore
by rollcat on Wednesday May 18, 2022 @06:55AM
(#31421237)
It tends to blow up "git status" if some random new piece of software (or random me) makes a random new subfolder, full of random things. You can override .gitignore for specific subfolders like .config, .emacs.d, etc.
Re:Git ignores .gitignore with .gitignore in .gitignore
by burntsushi on Wednesday May 18, 2022 @10:20AM
(#31423115)
That's what I used to do, but I switched to Josh's strategy a couple years ago.[1] It doesn't "blow up" git-status. If some new piece of software creates a new directory with a bunch of random stuff in it, git-status will just show you the directory since it is is untracked, and not everything in it.
[1]: https://github.com/BurntSushi/dotfiles/blob/965383e6eeb0bad4...