Professional Documents
Culture Documents
How To Clone All Remote Branches in Git PDF
How To Clone All Remote Branches in Git PDF
$ git branch
master
But there are other branches hiding in your repository! You can see these using the -a flag:
$ git branch -a
master
remotes/origin/HEAD
remotes/origin/master
remotes/origin/v1.0-stable
remotes/origin/experimental
If you just want to take a quick peek at an upstream branch, you can check it out directly:
Now, if you look at your local branches, this is what you'll see:
$ git branch
experimental
master
You can actually track more than one remote repository using git remote.
master
remotes/origin/HEAD
remotes/origin/master
remotes/origin/v1.0-stable
remotes/origin/experimental
remotes/win32/master
remotes/win32/new-widgets
At this point, things are getting pretty crazy, so run gitk to see what's going on: