I keep certain files from my home directory in a git repo in order to make it easier to set up new boxes or recover from mangled home directories or goofs in editing, etc. It's mainly stuff like .bashrc, .emacs, .tmux, etc., and my personal ~/bin directory of custom utilities I use a lot. It helps a lot because at any time I may edit these files on any of these boxes, and need those changes to propagate to all my other boxes. Git merge makes all that a breeze.
I also like to push my .ssh directory, that's the biggest pain in the ass to copy from box to box. (Of course, I encrypt any private key files I have in there which necessitates I always have to use ssh-agent, enter passwords, etc, to initially load the keys but it's worth it. Using ssh on a multi-user box is inherently dangerous. I hope the ssh-agent setup protects my private keys in these situations, does it? Is there a better way? Store keys on a thumb drive? What if I lose the thumb drive or it gets corrupted? I would be screwed).
Wondering if anyone else does this, what dangers are there I haven't considered, and that maybe this is actually a good way to do it.
Here's one problem I have. I work on Mac, Linux, and Windows (I use Cygwin, shut up, I know) boxes. Obviously, I can't use the same executables (my ~/bin directory) and often even the shell scripts are incompatible. For example, the Mac OS "find" command is really weak, doesn't have many of the important options the Linux version has. So a lot of my custom shell scripts that use find don't work right.
Is this going to require multiple "master" branches, one for each OS? That's what I do now and they start to get out of sync, and merging them is dangerous.