docs:git:importing_an_svn_repository

This is an old revision of the document!


importing an svn repository

  1. create a text file somewhere (~/Desktop/users.txt) to map the svn users to git users
    jdoe = John Doe <jdoe@example.com>
  2. create a temporary project directory, and change to it
    mkdir myproject_tmp
    cd myproject_tmp
  3. initialize an empty git repository
    git svn init http://host/path/to/your/svn/repo/ --no-metadata
  4. set up the user file for mapping
    git config svn.authorsfile ~/Desktop/users.txt
  5. import the svn repository
    git svn fetch
  6. change up one directory, and clone this newly created repository (this cleans up all svn stuff)
    cd ..
    git clone myproject_tmp myproject
  7. the myproject_tmp directory can now be removed, and the origin remote
    rm -Rf myproject_tmp
    cd myproject
    git remote rm origin
  • docs/git/importing_an_svn_repository.1255925798.txt.gz
  • Last modified: 2009/10/18 22:16
  • by billh