Created
July 28, 2009 17:49
-
-
Save rip747/157560 to your computer and use it in GitHub Desktop.
instructions for converting from svn to git
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
(no author) = Unknown Author <[email protected]> | |
tpetruzzi = Tony Petruzzi <[email protected]> | |
$ git svn clone --stdlayout --no-metadata --authors-file=authors.txt <svn_repo_url> <git_tmp_repo_dir> | |
$ cd <git_tmp_repo_dir> | |
$ git branch -r | sed -rne 's, *tags/([^@]+)$,\1,p' | while read tag; do echo "git tag $tag 'tags/${tag}^'; git branch -r -d tags/$tag"; done | sh | |
$ git branch -r | grep -v tags | sed -rne 's, *([^@]+)$,\1,p' | while read branch; do echo "git branch $branch $branch"; done | sh | |
$ cd .. | |
$ git clone --bare <git_tmp_repo_dir> <git_repo_dir> | |
$ cd <git_repo_dir> | |
$ git gc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment