How to properly store dotfiles in a centralized git repository

Many OS X programs, such as TextEdit, save files in a way that breaks hard links.

At least on Linux, symlinks are usually used for this purpose:

$ ln -s ~/dotfiles/bashrc ~/.bashrc

I've been helping build a tool to handle this called freshshell. It's similar to homesick with the added feature of being able to pull in files from any GitHub repository, the idea being that you can grab pieces of other peoples config along side your own.

fresh is a tool to source shell configuration (aliases, functions, etc) from others into your own configuration files. We also support files such as ackrc and gitconfig. Think of it as Bundler for your dot files.


I highly recommend vcsh and myrepos to manage your dotfiles via Git (and across multiple machines).

Richard Hartmann’s vcsh allows you to manage all your dotfiles in Git without the need to set up numerous symlinks. The key is that any number of Git repositories can co-exist in parallel in your home directory without getting in each other’s way. Furthermore, vcsh was designed with myrepos in mind. This tool allows you to manage all your version control repositories all at once. Most notably, mr can update all your repositories with one single call. Ideal for setting up all your dotfiles on a new machine with as little effort as possible.

I just published a blog entry that explains how to set up these tools in order that you are able to manage dotfiles quickly and effortlessly. Maybe this is helpful for you.