3 ms·
I think one reason some people prefer symbolic links over directly managing $HOME with git is that there's less chance that things go wrong due to a bad acciden
by anishathalye 7y ago
I think one reason some people prefer symbolic links over directly managing $HOME with git is that there's less chance that things go wrong due to a bad accidental git command. For example, `git clean` (with the appropriate arguments, e.g. '-fdx') could delete all non-dotfiles from all of $HOME.
Admittedly, the chance of this happening does seem much lower when the git directory is in e.g. '~/.cfg/' while the work tree is $HOME, as the linked article proposes, than when it's set up with just a `git init` run in $HOME (because a `git clean` in a non-git-repository directory somewhere under $HOME won't cause any problems, because there will be no '--work-tree' argument). Still, at least to me, the symlink approach feels more comfortable.
I wonder, does anyone else have other reasons to prefer symbolic links?