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.

  • GIT: clone works, remote push doesn't. Remote repository over copssh
  • Typical .gitignore file for an Android app
  • GIT: Any way to commit on multiple repos?
  • git alias command is not working can any one describe me syntax of git alias command
  • git-p4 submit fails with 'Path is not under client's root' error
  • git log over ssh remote repository
  • 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.

  • ignore gitignore files in subdirectories
  • What are the difference between these 3 .gitignore entries?
  • Visual Studio using TFS GIT error when connecting
  • Delete a project in Gerrit
  • Where Git staged files are stored?
  • Git post-receive hook for `Everything up-to-date`
  • 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.