Last Updated: February 25, 2016
·
5.255K
· sheerun

Stop reinventing the wheel. Use vcsh for your dotfiles.

@edit See my comment below fot the better alternative.

Most people who decide to put their dotfiles under version control start with a single repository in $HOME, adding all their dotfiles (and possibly more) to it. This works, of course, but can become a nuisance as soon as you try to manage more than one host.

The next logical step is to create single-purpose repositories in, for example, ~/.dotfiles and to create symbolic links in $HOME. This gives you the flexibility to check out only certain repositories on different hosts. The downsides of this approach are the necessary manual steps of cloning and symlinking the individual repositories. It will probably become a nuisance when you try to manage more than two hosts.

vcsh takes this second approach one step further. It expects single-purpose repositories and stores them in a hidden directory (similar to ~/.dotfiles). However, it does not create symbolic links in $HOME; it puts the actual files right into $HOME.

As an alternative you can use kitenet-mr plugin that uses GNU Stow for symlink management.

2 Responses
Add your response

Interesting. Wow and I thought I was way overthinking my dotfiles. :)

I have one set of dotfiles. Whenever a host needs something special, I create a .bashrc.local or .vimrc.local (or whatever) and source that. So far this has been good enough.

Also, I prefer to have symlinks in my home directory so I can edit them and use the changes now instead of first running a command to sync my home directory.

Even if I were to do this, I don't understand why vcsh chooses to use mr and multiple repos. Isn't a single repo enough? Maybe you have to be a sysops person to want this?

over 1 year ago ·

@kablamo You are actually right. This is protip from the time I was searching fot the method to manage my dotfiles. I've used it for a moment, but it seemed overly complicated as you say.

Finally I've chosen the way cowboy does it. You can view my still-in-progress dotfiles on my Github. The main difference is, cowboy uses bash and no framework, and I use zsh + prezto.

Thank you for the comment!

over 1 year ago ·