Run Stow on multiple stow directories at the same time, with a minimum amount of configuration and command-line arguments. Install and update dotfiles with one command, even when they are organized in multiple repositories in topic directories.
Put all of your dotfile repositories somewhere, say,
~/dotfiles/. In each repository (
~/dotfiles/everywhere/), dotfiles should be put into a topic directory (
~/dotfiles/everywhere/shells/), and then organized in the same directory hierarchy as you want them in
Create an empty
.stowfile in each repository (
> stows -c ~/dotfiles --target ~ > # or > cd ~/dotfiles > stows --target ~
(Even better) Create a
.stowrcfile in each repository, in which
--targetis specified. For example, just the first line below is enough, but you might want to change the default action while you're at it:
> stows -c ~/dotfiles > # or > cd ~/dotfiles > stows
The Stows help message (
stows -h) has more details on configuration and
One way of managing dotfiles is to keep them under version control in their own
directory, and then to use Stow to create symlinks in your
where the dotfiles are supposed to be. It's also common to organize your
dotfiles into directories that match the application or topic that they belong
to: editors, git, shells, etc.
You might also have multiple bundles of dotfiles, config files, scripts, secret keys, etc. that you want to store in separate repositories. Stows is helpful if your dotfiles look like this:
~/dotfiles/ dotfiles-common/ (<- git repo) bash/ (.bashrc, .bash_profile, ...) git/ (.gitconfig, .gitignore, ...) misc/ (.config/ .dircolors, .inputrc, ...) tmux/ unison/ ... dotfiles-work/ (<- git repo) docker/ puppet/ pylint/ ... dotfiles-secret/ (<- sneakernet, rsync, encrypted git repo, ...) ssh/ (.ssh/known_hosts, nonpublic servers in .ssh/config.secret) git/ (github key in .gitconfig.secret) ...
More info on this dotfile setup---and why you might use Stows instead of just using Stow---can be found in this blog post.