I use GNU stow to manage all the important dotfiles.
Instructions
- Create a repo called
dotfilesin your$HOMEdirectory - Recreate the directory structure for the files you want to manage as subdir(s) of that directory.
mkdir -p ~/.dotfiles/bash
mv ~/.bashrc ~/.bash_logout ~/.dotfiles/bash
cd ~/.dotfiles
stow bash
Stow will create symlink for each file.
.bashrc -> dotfiles/bash/.bashrc
Don´t forget to add this file to your git repo. Commit and push to remote and your done.