Showing posts with label GitHub. Show all posts
Showing posts with label GitHub. 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.

Thursday, January 3, 2013

GitHub flavored markdown

Sometimes it's useful to process GitHub flavored markdown file (e.g. README.md) to generate HTML e.g. to email  output for review. This can be done with help of color-marked:
$ sudo apt-get install npm
$ sudo npm install -g color-marked
Now README.md can be processed to generate README.html:
$ color-marked --gfm README.md > README.html