Convert Google Code Project from svn to git (2012)
This page shows you how to convert your Google Code svn repository to git.
Goto your Google Code page, choose the menu [Administer] tab, and then choose the menu [Source] tab, then change the repository type to Git.
Then, do the following in terminal on your local machine:
git svn clone --stdlayout https://‹projectname›.googlecode.com/svn ‹projectname› cd ‹projectname› git remote add googlecode https://code.google.com/p/‹projectname› git push --all googlecode
For a project of 1.6k files, it takes about ten minutes.
If you have wiki on Google code, same steps:
The subversion repository will remain accessible atgit clone https://code.google.com/p/‹projectname›.wiki cd ‹projectname›.wiki svn export --force http://‹projectname›.googlecode.com/svn/wiki . git add . git commit -m "Initial import of wiki." git push origin master
https://projectname.googlecode.com/svn/
, however, they won't be updated.
I did this for my ErgoEmacs project http://code.google.com/p/ergoemacs/. It went smooth. All commit history are also transferred.
Reference:
- Google Code Git FAQ
- By Google.
http://code.google.com/p/support/wiki/GitFAQ
- Convert your project from Subversion to Git
- By Google.
http://code.google.com/p/support/wiki/ConvertingSvnToGit