So I've got a pretty customized setup of dotfiles at this point, and I've been looking for a solution to keep things synchronized from machine to machine. I like the idea of having a ~/dotfiles dir (or similar) that contains a makefile that handles creation of symlinks. Move the dotfiles dir from machine to machine via rsync/unison/dvcs/whatever, and I'm good to go.
The problem with this occurs because the files differ slightly on some machines, and I would like a way to track this. For example, my .xmobarrc (a panel application for those not familiar), has a configuration setting to display battery life on my laptop, but not on my desktop.
What is the best way to manage files with per machine differences like this, in such a way that if I change on one machine something that should affect all machines, I can merge back, and if I change on one machine that shouldn't get merged, it won't. Obviously a DVCS like git is necessary for this as opposed to rsync/unison/etc, but I'm not sure how to set this up.
Master branch with one branch per machine that I merge/rebase/cherry pick back and forth from? This seems a bit tedious. Is there a better way?