Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== 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<code> jdoe = John Doe <jdoe@example.com> </code> - create a project directory, and change to it<code> mkdir myproject.git cd myproject.git </code> - initialize an empty git repository<code> git svn init -s http://host/path/to/your/svn/repo/project/trunk --no-metadata </code> * 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<code> git config svn.authorsfile ~/Desktop/users.txt </code> - import the svn repository<code> git svn fetch </code> - sync with svn (like running svn update)<code> git svn rebase </code> - 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<code> git svn dcommit </code> - 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/ docs/git/importing_an_svn_repository.txt Last modified: 2010/09/20 10:09by billh