This is taken from here. http://stackoverflow.com/questions/67699/how-do-i-clone-all-remote-branches-with-git/72156#72156 Want this as a gist because I always come back to this posting.
First, clone a remote git repository and cd into it:
$ git clone git://example.com/myproject
$ cd myproject
Next, look at the local branches in your repository: