Hacker News new | ask | show | jobs
by sam_lowry_ 298 days ago
This was discussed a lot on HN.

The problem with this approach is that you can accidentally commit to the $HOME repository.

An approach that avoids that is to use --git-dir= attribute.

E.g. alias dotfiles="git --git-dir=$HOME/.dotfiles"

1 comments

This is basically what vcsh (https://github.com/RichiH/vcsh) does. You can install the package via your package manager to get the manpage + completions, or copy in the shell script (https://github.com/RichiH/vcsh/blob/main/doc/INSTALL.md#stan...).