Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
docs:git:importing_an_svn_repository [2010/03/11 20:09] – billh | docs:git:importing_an_svn_repository [2010/09/20 10:09] (current) – billh | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== importing an svn repository ====== | ====== importing an svn repository ====== | ||
- | ===== Example 1: using git while keeping an svn repo intact ===== | + | ===== using git while keeping an svn repo intact ===== |
- create a text file somewhere (~/ | - create a text file somewhere (~/ | ||
jdoe = John Doe < | jdoe = John Doe < | ||
Line 28: | Line 28: | ||
- 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 | - 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 | ||
- | ===== Example 2: converting a project from svn to git ===== | + | ===== See Also ===== |
- | To get in the right frame of mind, don't think of exporting your entire svn repository, but rather export project by project. | + | |
- | + | ||
- | - create a text file somewhere (~/ | + | |
- | jdoe = John Doe < | + | |
- | </ | + | |
- | - create a temporary | + | |
- | mkdir myproject_tmp | + | |
- | cd myproject_tmp | + | |
- | </ | + | |
- | - initialize an empty git repository< | + | |
- | git svn init http:// | + | |
- | </ | + | |
- | - set up the user file for mapping< | + | |
- | git config svn.authorsfile ~/ | + | |
- | </ | + | |
- | - import the svn repository< | + | |
- | git svn fetch | + | |
- | </ | + | |
- | - change up one directory, and clone this newly created repository (this cleans up all svn stuff)< | + | |
- | cd .. | + | |
- | git clone myproject_tmp myproject | + | |
- | </ | + | |
- | - the myproject_tmp directory can now be removed, and the origin remote< | + | |
- | rm -Rf myproject_tmp | + | |
- | cd myproject | + | |
- | git remote rm origin | + | |
- | </ | + | |
===== External Links ===== | ===== External Links ===== | ||
* http:// | * http:// |