Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
docs:git:converting_an_svn_project_to_git [2010/09/20 11:07] – billh | docs:git:converting_an_svn_project_to_git [2013/10/13 11:31] (current) – [set up svn to git user mappings] billh | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== set up svn to git user mappings ===== | ===== set up svn to git user mappings ===== | ||
- | - create a text file somewhere (~/Desktop/ | + | - create a text file somewhere (~/.git-svn-users) to map the svn users to git users< |
jdoe = John Doe < | jdoe = John Doe < | ||
</ | </ | ||
- alter your global config file (~/ | - alter your global config file (~/ | ||
- | git config --global svn.authorsfile ~/Desktop/ | + | git config --global svn.authorsfile ~/.git-svn-users |
</ | </ | ||
Line 14: | Line 14: | ||
git svn clone svn:// | git svn clone svn:// | ||
</ | </ | ||
+ | * UPDATE - it seems as if the error below could be related to Tortoise and/or the TortoiseSVN cache running at the same time (we are writing these conversions directly into an svn working copy) | ||
* if you get an error like the following, just ctrl-c the operation, delete the temporary directory, and try it again< | * if you get an error like the following, just ctrl-c the operation, delete the temporary directory, and try it again< | ||
20592274 [main] perl 3584 C: | 20592274 [main] perl 3584 C: | ||
Line 29: | Line 30: | ||
</ | </ | ||
- (optional) compare your current svn working copy with the final git working copy, then remove the project from svn | - (optional) compare your current svn working copy with the final git working copy, then remove the project from svn | ||
+ | |||
+ | If you are lucky (no errors), steps 1-5 can be automated with a simple bash loop:< | ||
+ | for file in {project1, | ||
+ | do | ||
+ | git svn clone file:/// | ||
+ | && git clone --bare ${file}_tmp / | ||
+ | && rm -Rf ${file}_tmp/ | ||
+ | && git clone / | ||
+ | done | ||
+ | </ | ||
===== old method ===== | ===== old method ===== |