dotfiles

Machines will come and go—bring your configuration with you.

Purpose

A variety of configurations are specified using .-prefixed files that live in your home directory. You’ve likely spent more hours than you’d like to admit meticulously honing them. Using a remote git repo to keep track of them serves a few purposes–(1) keep a backup in case of hardware failure, (2) make it easy to bring your configuration to multiple machines, and (3) let the rest of the community see them.

Method

The method is quite simple: keep the files you care about in a repository in your home directory and create symbolic links to them from the home directory. I prefer to keep my configuration in a directory named .dotfiles which contains a git repo.

When you get to a new computer, just run the install.sh script to create the symbolic links. The script was inspired by this and is fairly lightweight. The important thing to note is to put any files you don’t want symlinked (such as .git) in the IGNORE array at the top of the script.

I’ve kept the script as simple as possible—mainly so I can come back to it in a few months and still understand what it does. Many others have much more involved setups. Check out this site for some amazing examples.

My full configuration can be found on my Github.