Created
March 19, 2010 17:57
-
-
Save sylr/337963 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env bash | |
git svn init svn://<host>/ \ | |
--trunk=<project>/trunk \ | |
--branches=<project>/branches \ | |
--tags=<project>/tags \ | |
project.git | |
cd project.git | |
cat .git/config | \ | |
sed s#:refs\/remotes\/trunk#:refs\/heads\/master# | \ | |
sed s#:refs\/remotes\/\\*#:refs\/heads\/*# | \ | |
sed s#:refs\/remotes\/tags\/\\*#:refs\/tags\/*# | \ | |
sed "s#bare = false#bare = true#" > .git/config.tmp | |
mv .git/config.tmp .git/config | |
git svn fetch | |
git svn gc | |
git gc --aggressive | |
cp -R .git/* . | |
rm -rf .git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment