[LLVMdev] 2 experimental projects

Holger Schurig hs4233 at mail.mn-solutions.de
Thu Mar 20 01:37:49 PDT 2008


> To drive forward these projects I prefer to work on branches.
> So I apply for a branches/ggreif/... hierarchy in the
> repository. I shall make
> it easy to use "svn switch ..." for the relevant directories
> for anybody who wants to test my work.

I think that this might not generally be known, but you can 
use "git" as your SCM/DSCM and have lot's of local, fast and 
cheap branches ...  and yet you can commit/update to/from an svn 
repository.

E.g. you can do

  $ git svn clone -s -r101 svn://svn.foo.com/svn/proj

This clones the names repository with revision 101 ("-r101") and 
a standard trunk/ branches/ tags/ layout ("-s").

  $ cd proj
  $ git checkout -b test

This creates a test branch and checks it out. This is very fast. 
Way faster than "svn switch" ... and you don't have to remember 
the different URLs but just use a simple name. 

Now edit. Then

  $ git commit -a

to check your local change in. You can have as many local 
branches as you want and, once the branch is created, you can 
switch very fast between them using "git checkout master", "git 
checkout test". You can even stash away uncommitted stuff in a 
hurry (without committing it) with "git stash", see "git 
stash --help". Once you're done, send your commits back to svn:

  $ git svn dcommit

Now the subversion users will have your commits as well.


More about git-svn
------------------
http://tsunanet.blogspot.com/2007/07/learning-git-svn-in-5min.html
http://utsl.gen.nz/talks/git-svn/intro.html
http://www.kernel.org/pub/software/scm/git/docs/git-svn.html


Git on MAC OS X
---------------
http://www.dekorte.com/blog/blog.cgi?do=item&id=2539



More information about the llvm-dev mailing list