3 ms·
My most recent major git crisis wasn't reversable by git. A little while ago, I accidentally did a `git clean -xdf` on my home directory (wrong tmux tab). I in
by chjj 11y ago
My most recent major git crisis wasn't reversable by git.
A little while ago, I accidentally did a `git clean -xdf` on my home directory (wrong tmux tab). I index my home directory: just the most important config files, among other notes and text files. That `git clean` call wiped half my home directory before I realized what was happening and frantically tried to ^C and ^\ it. I had to find other ways to recover my files.
The deleted files weren't essentially important, which is why I didn't back them up frequently or index them, but they were moderately important. That was a bad day.
I realize it's probably better to dump everything in ~/.config and index that instead, while maintaining symlinks in ~/. It was just the way I had it set up.
- ossreality 11y agoYou know to fix this? Symlink your bullshit in ~/ to some other directory. I have a "my_config" repo on GitHub that contains personalized home files. Shockingly!!!!! they're not stored in my home directory because that would be an absurd idea! Instead .{vimrc,profile,bashrc} are symlinked to ~/code/{mysusername}/my_config/{_vimrc,_profile,_bashrc). Guess how many times I've wiped out my home dir? (it's zero, zero times)
- leni536 11y agoI suggest to use GNU stow for managing config files and keep your repo in a separate directory.