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:
$ Git Branch * Master
But there are other branches hiding in your repository! You can see these using
-
Flag:
$ 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
You can actually track more than one remote repository usingGit remote
.
$ Git remote add Win32 git: // example.com/users/joe/myproject-win32-port$ git branch-A * master origin/head origin/Master origin/V1.0-stable origin/experimental Win32/Master Win32/new-Widgets
At this point, things are getting pretty crazy, so runGitk
To see what's going on:
$ Gitk -- all &