Created
June 21, 2010 06:31
-
-
Save vrillusions/446491 to your computer and use it in GitHub Desktop.
Reminder to self on converting svn repos
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
# Permanently move a subversion repos to git | |
# If you have tags and branch but never used them you can do this: | |
git svn clone -s --no-metadata --authors-file ~/git_resources/authors https://example.com/svn/repos | |
git remote add origin [email protected]:username/repo.git | |
git push -u origin master | |
# Don't forget to add a README.markdown file. | |
# | |
# optionally use git clone on the repository again, this will remove all the svn stuff from | |
# .git/config file. If you push to github all you need to do is do the initial push and then | |
# clone THAT repos to remove the subversion stuff as well as the reference to remote trunk branch | |
# If there are tags and branches, see: | |
# http://pauldowman.com/2008/07/26/how-to-convert-from-subversion-to-git/ | |
# http://www.jonmaddox.com/2008/03/05/cleanly-migrate-your-subversion-repository-to-a-git-repository/ | |
# Notably neither really mentions how to convert remote branches to local ones. But you can use | |
# svn2git: http://github.com/nirvdrum/svn2git and if you have a small project can just look at source | |
# Also a perl version at http://github.com/schwern/svn2git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment