Thursday, December 13, 2012

Steps to create remote branching in git (github)

This is a note to myself (may be useful to some of you)

1. Install git_remote_branch ruby utility
git_remote_branch simplifies the git remote branching process. More details about git_remote_branch can be found here:

We should ensure ruby is already installed before attempting to install git_remote_branch

To check if ruby is installed, try the following command:
$ ruby --version

If ruby is installed, we will get result similar to the following:
ruby 1.8.7 (2011-06-30 patchlevel 352) [i386-mingw32]
If ruby is not installed, we will get message like "ruby command not found".

$ gem install git_remote_branch

2. Create a new branch using git_remote_branch (grb) unity
$ grb create 1.0

3. Push the changes to the server (in my case github)
$ git push

4. Tag the branch
$ git tag tag-1.0

5. Push the tags to server
$ git push --tags

Thats it!