How to Complete the Migration of Google Code Project Wikis to GitHub Wikis ¬

2015-03-15

As you probably now know, Google is shutting down Google Code in less than a year and are encouraging users to switch to other open source hosting platforms such as GitHub. They have a handy Export to GitHub tool, which is easy, if a bit slow. I had a couple stale projects on Google Code that I hadn’t moved to GitHub yet, so I gave the tool a shot.

It appears to do a good job on the source code side of things, but has a few issues for project wikis (despite automatically converting to Markdown):

1. It doesn’t preserve history or images.
2. It exports the wiki data into a separate ‘wiki’ branch, not the GitHub project wiki.

There’s nothing I can do about the former, but I was able to easily automate resolution of the latter since GitHub allows you to clone project wikis to local repositories for advanced editing.

Introducing finishGoogleCodeGitHubWikiMigration, a bash script which—given a Google Code project exported to GitHub—takes the ProjectHome.md wiki page and makes it into the project’s README.md file, plus moves all the wiki pages over to the GitHub project’s wiki, fixing page links as it goes. I don’t know why Google couldn’t have included that functionality in their tool since you have to give it access to your GitHub account anyway.

You can find finishGoogleCodeGitHubWikiMigration on GitHub at (see the README for usage instructions) and feel free to submit pull requests for improvements:

https://github.com/morgant/finishGoogleCodeGitHubWikiMigration

NOTE: While it works on fresh clones of the project repositories, it does modify the repositories. If you don’t like the changes it makes, DO NOT push the changes back to GitHub!

One final comment on the Google Code project export process: you can also set the ‘project moved’ flag on the Google Code project if you want it to permanently redirect to the GitHub project, but I’ve found you cannot revert the change, so only do so when you’re really sure you’re happy with the migration.

  1. thnks

  Textile Help