Managing dotfiles with Git and grace
Initialize dotfile repository. By default, moredots will store them in
mdots init # mdots init ~/dotfiles --home ~/
Add some files using
mdots add vimrc mdots add .vimrc mdots add ~/.vimrc
moredots will put the originals inside the dotfile repository, while the original file is replaced with a symbolic link:
$ ls -al | grep vimrc lrwxrwxrwx 1 xion xion 26 Nov 18 02:44 .vimrc -> /home/xion/dotfiles/.vimrc
Once you added all files, synchronize them with remote Git repository, e.g. on GitHub:
mdots sync firstname.lastname@example.org:Xion/dotfiles
This will pull, merge and push the files from/to designated repo. It will be remembered as origin so later you can simply do:
to synchronize any changes.
Eventually, you will want to put your dotfiles on new machine. For that, you can simply do:
mdots install email@example.com:Xion/dotfiles # mdots install firstname.lastname@example.org:Xion/dotfiles ~/dotfiles --home ~/
supplying the URL to your dotfiles repository. This will put appropriate symlinks inside your home directory that point to files inside the dotfiles repository.