My New Dotfiles Management - Using GNU Stow
I have maintained a "dotfiles" repository since I made my github account in 2013. However, overtime it became more of a post-apocalyptic wasteland, cluttered with remnants of obsolete configurations and scraps of scripts. It was no longer the pristine, culled, collection that I desired. I also did not have an efficient method of easily linking the files on a new system. I had to manually make symlinks for each dotfile. I knew there were much better dotfiles setups out there, but I never got around to it. Until now.
After setting it all up, I decided to just start from scratch with a new repository.
Each application has an associated sub-directory (ex:
dotfiles/emacs), which contains all of the dotfiles/folders associated with that application. Structurally, I treat the items in each application directory as if they were in my
~. For example, the
vim sub-directory has my
.vimrc, as well as the
.vim/colors/ directory. This is so that when I use stow, it will properly link them in
When I setup my dotfiles on a new system, or install an application for which I already have dotfiles saved for, setting them up is as easy as typing:
stow application-dir (ex:
GNU Stow then links the files under my home directory. In my vim example, this means symlinks are created for
~/.vim/colors/*, pointing to their respective locations in
I think this setup is brilliant. Initializing an application's directory is so simple, and I can choose to only initialize specific sub-directories.
In the future, I might make multiple branches of the repository, one for each of my computers, so I can maintain specific configurations. In theory, I could also just make different folders (ex
vim-server), but I like the branch idea better because it's a little easier for me to merge changes. We shall see.
Anyway, that's the new setup. Enjoy :-D