Re:Git ignores .gitignore with .gitignore in .gitignore
by _fat_santa on Wednesday May 18, 2022 @08:53AM
(#31422119)
I was looking at someone's dotfiles on Github a while back and they employed this method. Essentially they made their entire home directory a git repo but used gitignore to ignore everything but the dotfiles they wanted to backup. It was a pretty nifty setup
[ Parent
| on HN ]
Re:Git ignores .gitignore with .gitignore in .gitignore
by account42 on Wednesday May 18, 2022 @11:11AM
(#31423779)
A nifty setup until you run a git command like `git clean -fx` somewhere under your home directory that you think is another git directory but isn't. Happy restore from backups time.
Re:Git ignores .gitignore with .gitignore in .gitignore
by ansible on Wednesday May 18, 2022 @10:41AM
(#31423362)
I feel obligated to point out vcsh [1], which is likely already packaged for your operating system.
[1] https://github.com/RichiH/vcsh
The main selling point is that you can set up various git repos for different things. I have one for SSH keys (and no, that does not get pushed anywhere except to my own private server), VIM, neovim, bash, and 'other' (for misc config files like .dir_colors, .gitconfig, etc.).