Skip to content

Instantly share code, notes, and snippets.

@thomastraum
Created April 24, 2012 16:40
Show Gist options
  • Save thomastraum/2481323 to your computer and use it in GitHub Desktop.
Save thomastraum/2481323 to your computer and use it in GitHub Desktop.
git remote branch
$ git branch -a
* master
origin/HEAD
origin/master
origin/v1.0-stable
origin/experimental
If you just want to take a quick peek at an upstream branch, you can check it out directly:
$ git checkout origin/experimental
But if you want to work on that branch, you'll need to create a local tracking branch:
$ git checkout -b experimental origin/experimental
Now, if you look at your local branches, this is what you'll see:
$ git branch
master
* experimental
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment