Brian Tanaka

Brian Tanaka Consulting Services LLC

Basic git-svn Skills

Is your team using SVN, but you want to use Git? No problem. Here's a quick overview of how to work with git-svn.

Cloning

  1. On your local drive, create a directory for your repository. For example:

    $ mkdir incredible_project
    
  2. In SVN, use svn info to reveal the URL of the SVN repository. Let's say it's: https://svn.example.com/svn/stuff/trunk/

  3. Clone the project:

    $ cd incredible_project
    $ git-svn clone https://svn.example.com/svn/stuff/trunk/
    

    Optionally, you can specify a revision range. For example, to specify revision 3626 to HEAD:

    $ git clone -r3626:HEAD https://svn.example.com/svn/stuff/trunk/
    
  4. Have fun hacking while benefiting git's awesome branching and other features.

(Note: Does your project have svn:externals? Try Marc Liyanage's git-tools Psst... Choose the Ruby script.)

Interacting with the SVN repo

Fri Aug 27 19:37:11 PDT 2010