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.

  • ZF2 autoloading strategy for development and production with git/composer
  • GIT, check return code of commands (bash script)
  • Attributing a single commit to multiple developers
  • Disable Git integration in Visual Studio 2015 permanently
  • Can Git show history for selected lines?
  • How can I transport a Git repo from one PC to another when the files are (probably) current?
  • 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.

  • How can I set up gVim as my editor on Git for Windows?
  • Code Lens not working properly after interactive rebase
  • How would you put an AppleScript script under version control?
  • How do I include library from github in python project without pip?
  • How do I add a remote Git repository to an Ubuntu Server?
  • how can I add git submodule into git repo as normal directory?
  • 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.

    Git Baby is a git and github fan, let's start git clone.