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.
On GitHub.com, navigate to the main page of the repository. Under your repository name, click Settings. Under "Danger Zone", click Transfer. Read the information about transferring a repository, then type the name of the user or organization you'd like to transfer ownership of the repository to.
In the upper-right corner of any page, click , and then click Import repository. Under "Your old repository's clone URL", type the URL of the project you want to import. Choose your personal account or an organization to own the repository, then type a name for the repository on GitHub.
Create a github repository, and make sure your SSH key, etc... is installed properly.
Check out your repository from google.
Run:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With