Thursday, January 22, 2009

Working with Remote Branch on Git

I had two branches on github, one is master and other is trial, now when I clone I just get the master branch.
How do I get the trial branch, here are the commands

$ git branch -a //lists all branches on remote,
$ git checkout origin/trial //to preview the remote branch
$git checkout -b trial origin/trial //to clone the remote branch

$git branch //verify the local branches

Here is a good link on Git Remote Branches