Jonny Zone : Copyleft – all rights reversed

October 5, 2008

How to see git remote branches?

Filed under: Dicas — acassis @ 8:35 pm

Come on! We know u-boot-arm’s git has many branches, but why “git branch” shows only the master one?

$ git branch
* master

It doesn’t make sense at all. When I access http://git.denx.de/?p=u-boot/u-boot-arm.git I can see: master, testing, next and others branches at bottom of page.

Answer: these branches are remote branches and you need special command to make them local.
To see them try it:

$ git branch -r
  origin/20070326_ene
  origin/HEAD
  origin/Makefile-next
  origin/master
  origin/next
  origin/testing

Now is time to make it local:

$ git checkout -b local_test origin/testing

Now you can see two branches:

$ git branch
* local_test
  master

Happily a Gelato guy already got these problems before, otherwise I could be on a “Gelada”.

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.