Alternatively, you can do what I do and use the GNU Stow. I have dotfiles in the repository, one subdirectory for each category, for example:
dotfilerepo/zsh/.zshrc dotfilerepo/zsh/.zlogin dotfilerepo/git/.gitconfig dotfilerepo/vim/.vimrc
then I can cd into repo and make stow zsh , and it will create a symlink from ~ / .zshrc to repo / zsh / .zshrc, another from zsh / .zlogin to ~ / .zlogin. stow vim to create symbolic links from the vim subdirectory to ~ etc.
I have a script, install-linkfarm that executes all the stow commands, so when I switch to a new machine, I clone my repo, cd to it and run install-linkfarm and fine.
source share