Migrate git repo from Google Code to Github
I have a git project hosted on Google Code. I’d like to move it to Github, with the revision history included. I don’t use the ticket system so that won’t matter.
In similar questions like mine, the problem is migrating from a SVN repo in Google Code to Github. I’m already using git.
I have the project checked out on my machine because I’m developing on it. From what I understood from git, my local project already includes the full history because of its distributed nature. So maybe copying it to github is really simple, but I don’t know the steps.
Of course the idea is that new changes will be pushed to Github and the Google code repository would remain frozen.
3 Solutions collect form web for “Migrate git repo from Google Code to Github”
Create a github repository, and make sure your SSH key, etc… is installed properly.
Check out your repository from google.
git remote add github <URL FROM GITHUB> git push github HEAD
That will push your current branch. You can push others by switching to them and repeating the
git push github HEAD (or other, more advanced ways).
On Github create an empty repository, push your local repository to it — done.
At that point if you want all future pushes to go to Github, change the
origin remote to point to the Github repository instead of the one at Google Code — or you can clone a new working repository from Github.
You can use Google Code export to GitHub feature.