Version controlling my home dir

For awhile now I've noticed that things in my home dir aren't setup optimally for my work flow. I've been trying to run with SELinux enabled and I run into development problems when I try to run web applications out of my home directory. Various parts of my home directory are version controlled separately due to the software projects they're part of, but not as a whole.

What I'd like is to setup some other place for "projects" (Mozdev code and docs, other software projects, RPM building, etc) and then version control my home dir.

The problem is I'm not sure how much this helps me. Things like IM clients still are going to want to log things to ~/.somedir/log which is evil. SELinux contexts for files in /home/myprojects is still going to be wrong; I'm not going to be able to run webapps out of there, either. Moving my docs out of my home dir might be a pain due to xdg-user-dirs needing to be setup correctly to point at the document dir

I'd really love to have a lean, mean homedir that is version controlled that I can port around between boxes. Have people attempted this before? What about the above problems?


Kelly Clowers (visitor) says:

Do you know about the VCS-home wiki and mailing list?

dwarner's picture
dwarner says:

I had found the mailing list, but not the wiki; thanks!

Patrick (visitor) says:

Here's what I did. In my home dir, I have:

when you want to setup a new machine:
for i in etc bin projects; do svn co ${REPO}/${i} ${i}; done

I have an ~/etc/Makefile with a rule for creating a base set of symlinks from ~/etc/configfile to ~/.configfile for each package.

I really like the Makefile for putting all the things that you only run once in a while (like selinux labelling your files, and I really hope that you don't have different labels per box)

The best thing about this is that it flips the development bit in your head for your homedir. i.e. all the little incremental changes you make to your environment persist, and you end up with a comfortable fast workspace that you can easily set up anywhere.

Casey Dahlin (visitor) says:

I placed a git repository in my home folder and then renamed the .git directory to .homegit . Ths means git doesn't detect my home folder as a git repo at first. I then added "*" to the ignore file, so git will not version anything unless I explicitly tell it to. So to version control something in home its just:

hgit add -f file
hgit commit

where hgit is an alias to:

git --git-dir=$HOME/.homegit --work-tree=$HOME