Sjeiti
Sjeiti

Reputation: 2648

Migrating from Googlecode to Github with full revision history

Trying to migrate an SVN project to Github I first followed the following instructions to turn SVN into Git: http://code.google.com/p/support/wiki/ConvertingSvnToGit

This worked but I'm unsure what to do next to move from Googlecode to Github.

I've tried:

$ git remote add origin [email protected]:GITHUB_USERNAME/REPO_NAME.git
$ git push --all origin

(I hope that makes sense because I'm just guessing here)

It then tells me I should do a pull before I can push. But it pulls from Googlecode off course. So how do I tell it to pull from Github?

_

(I did also see this: http://github.com/nirvdrum/svn2git ... should I try it that way?)

Upvotes: 2

Views: 153

Answers (2)

Sjeiti
Sjeiti

Reputation: 2648

Ah far easier than I anticipated (but since I don't know any Git command line I didn't know where to start)...

Because my original repo was still on googlecode

$ git pull

would just pull from there.

$ git pull origin master

Did the trick. Had to add the branch (master) because origin is not the default remote. Then a

$ git push --all origin

and I'm ready to rock and roll

Upvotes: 1

willoller
willoller

Reputation: 7330

Here are the steps you want to take:

  • Use git-svn to checkout your google code
  • Create your github repo
  • Add your github repo as a remote
  • Pull your code from the git-svn repo git-svn rebase trunk <-- I think you are here
  • Push the code to your new remote git push origin master

That should be it.

Upvotes: 0

Related Questions