Showing posts with label Google Code. Show all posts
Showing posts with label Google Code. Show all posts

Tuesday, June 11, 2013

Fork a svn project from Google Code to GitHub

Clone a repo:
$ git svn clone http://<PROJECT>.googlecode.com/svn <PROJECT>
Enter the newly cloned directory:
$ cd <PROJECT>
Setup Git repository:
$ git remote add origin https://github.com/<USER>/<PROJECT>.git
$ git push origin master
Do some work and commit locally to Git. Once something is committed to SVN, rebase your local changes against the latest changes in SVN:
$ git svn rebase
$ git push

Stay tuned!

Saturday, June 8, 2013

Fork a git project from Google Code to GitHub

How to fork a git project from Google Code to GitHub:
  1. Create new repo on http://github.com as follows: https://help.github.com/articles/creating-a-new-repository
  2. Clone the project:

         $ git clone https://code.google.com/p/<PROJECT>/
  3. Set the remote origin url:
     $ git remote set-url origin https://github.com/<USER>/<PROJECT>.git
Now you can do local changes and commits. Push commits:
$ git push origin master
To stay synced, setup upstream repository:
$ git remote add upstream https://code.google.com/p/<PROJECT>/
$ git remote -v
Now you can fetch the remote repository updates from the Google Code and merge its changes into the local branch:
$ git fetch upstream
$ git merge upstream/master
Fix conflicts if necessary.