====== importing an svn repository ====== ===== using git while keeping an svn repo intact ===== - create a text file somewhere (~/Desktop/users.txt) to map the svn users to git users jdoe = John Doe - create a project directory, and change to it mkdir myproject.git cd myproject.git - initialize an empty git repository git svn init -s http://host/path/to/your/svn/repo/project/trunk --no-metadata * note the -s flag sets the default svn structure for /branches /tags /trunk; if this isn't how your repo is set up, you can use the -T -b -t flags - set up the user file for mapping git config svn.authorsfile ~/Desktop/users.txt - import the svn repository git svn fetch - sync with svn (like running svn update) git svn rebase - use the master branch to push to svn, and create git only branches for your local development - when you have a commit on the master branch ready to push to svn, do this git svn dcommit - since it takes so long to pull full svn history into a git repo, you may want to do this once and then set up a git repo that others can clone, if other users want to use git on a large project ===== See Also ===== * [[converting an svn project to git]] ===== External Links ===== * http://www.simplisticcomplexity.com/2008/03/05/cleanly-migrate-your-subversion-repository-to-a-git-repository/