Keeping your home directory in subversion

When your working and developing on many boxes, either physical computers or SSH-ing into remote servers it can be quite cumbersome to manage all your settings..

So just recently I started using subversion for managing my home directory.. it works great! I can just update, and commit to the central server and I just keep an "svn update" in my .bash_profile. Always in sync!

And.. you get the added benefit of decentralized backups (since its checked out on multiple boxes) and you can revert to a previous version in case you screw up.

Among other things, the repository now contains:

  • .bash_profile
  • .bash_rc
  • All my VIM settings and plugins
  • My SSH settings
  • a public_html folder
  • A dev folder with svn:externals to my most worked-on projects
  • My .netrc
  • A (password protected) sym-link from the dev/ to the public_html/ folder
  • Random shit

So yea, I just wanted to share this thought for people who might be dealing with the same issues.


7 Responses to Keeping your home directory in subversion

  1. 339 Jacques Marneweck 2007-01-22 5:40 pm

    I tend to have two setups. A full and basic home directory. The basic gets checked out at webhosts, etc. which I use. The full gets checked out at work and basically ensures that i have some level of sanity with my shells. I'm using svk to do revision control with subversion.

  2. 340 fa 2007-01-22 6:10 pm

    tried it some years ago and didn't continue for several reasons.

    a) my two main boxes are win xp
    b) too much junk in ~ and "my documents" that isn't really worth replicating
    c) I made some aliases in my bashrc to "get" and "put" it to all hosts via scp easily

  3. 341 Evert 2007-01-22 7:25 pm

    fa,

    yea it won't work that well for non-unix environments..

    I'm actually not adding in everything.. just the stuff I really need across server (you can easily ignore patterns)

    Just scp'ing works.. I just really like the idea of version control. By the way.. you might want to look into rsync instead as for syncing folders, it's often a lot faster..

    Evert

  4. 335 fa 2007-01-22 11:42 pm

    been there, done that
    As I said, the only file that really has versions because I need it on several host is my .bashrc.
    and manually checking an alias that displays the version number is less a hassle than version control for 1 file :)
    I really tried it but I never found the best way between
    - everything unneeded in version control
    and
    - too few and constantly searching stuff

    most probably it's the mess on all my harddrives, but it just didn't work for me :P

  5. 336 Thomas Koch 2007-01-23 7:30 am

    I'm very happy with unison: only syncing, no version control.

    http://www.cis.upenn.edu/~bcpierce/unison/

  6. 337 Ben Straub 2007-01-26 10:56 pm

    I just recently completed doing this, and it wasn't very fun, since I keep my bash env for three systems: WinXP at work, my linux web server, and my Mac. I set svn:ignore on ~ to "*", and just added the files that mattered:

    - a shared .bashrc
    - my .emacs and .emacs.d (so I have a centrally-located site-lisp)
    - .vimrc (Yes, I bat for both teams)

    This works for me so far. I haven't needed anything else, but if I do, it's a simple svn add away.

  7. 338 Scott Rider 2007-03-25 5:20 pm

    I keep my home directory on ZFS and use the incredible instantaneous snapshots.

    May you suffering souls rest in peace !

Leave a Reply



About

My name is Evert, and I've been writing semi-regularly on this blog since 2006.

I'm currently available for contract work.

more info.

Subscribe

Dropbox

Dropbox is a simple cross-platform online backup and sync application. The first 2GB of space is free, and both you and me get an extra 250MB extra space if you sign up through this link.