4 ms·
What worked best for me is to turn my user's home dir into a Git repository. My .gitignore contains this: * And if I need to add something, I just "git add -f
by haolez 1y ago
What worked best for me is to turn my user's home dir into a Git repository. My .gitignore contains this:
*
And if I need to add something, I just "git add -f ...". Works surprisingly well. Combines well with git-secret for things like SSH keys, certificates and API keys.
- lucasoshiro 1y agoI wouldn't trust that... If you by mistake run `git clean -xfd` in your home, well, you know what happens
- fouc 1y agoHa, I'll probably never run that command but perhaps some git commands can be disabled if they're run in ~/
- Ferret7446 1y agoSame thing as running `rm -rf *` by mistake. Don't do that and keep backups.
- fouc 1y agoneat, TIL https://sobolevn.me/git-secret/ https://sobolevn.me/git-secret/
- dp-hackernews 1y agoOr git-crypt or SOPS
- kryptn 1y agomy dotfiles follow atlassian's tutorial where they do this, but put the git dir somewhere else and alias away the git command. It has worked pretty well for me. https://www.atlassian.com/git/tutorials/dotfiles https://www.atlassian.com/git/tutorials/dotfiles
- RichardLake 1y agoOnly downside to this are tools that default to only acting on stuff under version control. Whenever I use rg inside my home directory I'm caught out by this.
- skydhash 1y agoI was caught by that too. But a recent read has given me a tip. Add a ripgrep specific ignore files that undo the home gitignore.