Created
October 25, 2012 14:53
-
-
Save jurka/3953048 to your computer and use it in GitHub Desktop.
svn 2 git migration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install git-core git-svn ruby rubygems | |
| sudo gem install svn2git | |
| mkdir svn-repo | |
| cd svn-repo | |
| svn co [SVN URL] . | |
| svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt | |
| # edit authors-transform.txt to this format: | |
| # jsmith = J. Smith <[email protected]> | |
| cd .. | |
| mkdir git-repo | |
| cd git-repo | |
| svn2git [SVN URL] --authors ../svn-repo/authors-transform.txt | |
| git remote add origin [GIT URL] | |
| git push --all | |
| git push --tags | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment