[svlug] Need advice/help managing documents - Subversion? GIT?

Brian J. Tarricone bjt23 at cornell.edu
Thu Oct 16 20:06:20 PDT 2008


Bill Ward wrote:
> I have several laptops that I use (my own, issued by work, my wife's) plus
> my desktop Linux box.  On each one I have differing subsets of documents,
> hopefully not in different versions :) and no really consistent way of
> syncing them up or backing them up.
> 
> I was thinking about setting up Subversion or GIT, and checking the files
> in/out of that.  I've never worked with either one, though I have a lot of
> experience with CVS and ClearCase.  So a few questions...
> 
> 1. Would this be a good idea?  Should I use SVN or GIT or is there something
> else I should consider?

For this use I'd recommend against git.  It seems like you want a 
central repository of documents that you sync with from various clients. 
  While git works fine with that model, svn is a bit better suited. 
And, coming from a CVS background, you'll have zero trouble picking up 
svn.  Git is a bit of a different beast, and you'd end up taking more 
steps each time you want to sync (git would require a local commit, 
followed by a push to the remote).

> 2. How would I need to organize my files to make this work?  For example I
> don't want to have a copy of everything on every machine - just the
> particular project that I need to work on at that moment in time.

With git, this would be a pain in the ass.  A git checkout (unlike svn) 
includes a copy of the entire repository history -- there's no way 
around this.  You also can't actually do partial checkouts of a git 
repo/module.  So you'd have to have several different git repos, whereas 
with svn, you can stick everything into one svn repo and selectively 
check out what you want.  You don't even have to keep any particular 
organisational style with svn -- you can check out directories 
recursively or non-recursively, and single files if you wish.

> Another wrinkle: my work laptop spends most of its time behind a firewall
> that only allows outside access via HTTP proxy, and it runs Windows.
> Whatever solution I use needs to run on Windows and needs to have some way
> of tunneling across that proxy.  I could set up SSH port forwarding via
> SecureCRT but would prefer if it had native HTTP proxy support using its own
> SSH.  WinCVS does SSH but as far as I know not with HTTP Proxy.  What about
> SVN or GIT clients for Windows?

As recent as 6 months ago or so, git tools on windows were pretty bad. 
TortoiseSVN is (from what I hear from people who use it), very good.

I'm not really sure about your proxy/tunneling situation -- are you 
saying that you can use ssh, but all other access needs to go through a 
HTTP proxy?  I don't really understand.  I'm not sure what svn or git 
support with regard to proxying, but both support ssh as a transport (as 
well as http [not recommended for committing, since there's no security] 
and https).  Both require DAV on the server if you want to commit/push 
using http/https.

Someone else recommended Mercurial: I've never used it myself, but its 
usage model is similar to git.  Not sure how well it supports partial 
checkouts, though.

I'd say go simple.  Using a "distributed" VCS (git, hg, bzr, mtn, etc.) 
is going to require a bit of learning before you get it right (which, 
hey, you might want to do because git is interesting; I use it all the 
time for software projects and I love it, but I wouldn't use it for 
versioning and syncing documents across machines).  SVN has a model that 
seems to fit your circumstances, and you already have the skills to use 
it -- for the most part, just replace "cvs" in any command you know with 
"svn".

Also there's a measure of safety: git, at least, allows you to do a lot 
of funny things with your revision control history, including rewriting, 
backing out commits, editing commits, etc.  It's fairly easy to actually 
destroy your data if you don't know what you're doing.  I don't mean to 
sound overly dramatic or scary: it's not such a terrible problem, since 
you always have an entire repository history on any machine where you've 
checked out your git module, but it can be a pain to resolve.  With svn, 
commits are  immutable without monkeying around on the server with the 
'svnadmin' tools.

	-brian




More information about the svlug mailing list