adapted from here
- create the repo
git init --bare $HOME/.dotfiles
- make a shell alias
echo 'alias dotgit="git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME"' >> $HOME/.bashrc && source $HOME/.bashrc
- add some dotfiles
dotgit add .config/i3/config
dotgit commit -m "add i3wm config"
dotgit remote add origin https://github.com/[your-username]/dotfiles.git
dotgit push -u origin master
- install on a new system
git clone --separate-git-dir=$HOME/.dotfiles https://github.com/[your-username]/dotfiles.git dotfiles-tmp
rsync --recursive --verbose --exclude '.git' dotfiles-tmp/ $HOME/
rm -r dotfiles-tmp