How to track $HOME with git
Solution 1:
I've been doing this for a while just using git. I don't track the entire home directory, just the parts that I am actively changing. This includes my home/bin directory, which contains lots of little scripts, my .vim directory, and some larger projects in other directories. Also there are some configurations for terminals and openbox, as well as various other apps, added to the repo.
This works well enough since all of this stuff has the same permission set and I don't care about the original timestamp. It's getting to the point where I'm planning to break some of it out into submodules using git filter-branch
. This is a bit tricky though since there are interdependencies between files in different subdirectories (eg some .vim scripts might call scripts from my bin directory... not a very good example but hopefully you get the point).
I haven't found any more comprehensive solutions, but also haven't really looked into any, including git-home-history. It seems like it would be pretty complicated to put the entire home directory under revision control, and there would be a lot of variables. For instance if you put your firefox profile(s) under revision control, you're going to end up piling up huge amounts of binary differentials. Also there are things like ssh keys that are often better lost than duplicated.
If you do want to track permissions (other than the executable bit, which git already tracks) there is apparently a hook that will do that. It's mentioned in this serverfault thread.