how to clone/pull all branches on a new PC

764 views
Skip to first unread message

M Noreen

unread,
Dec 15, 2011, 3:42:36 PM12/15/11
to GitExtensions
I just had to set up a new Windows 7 PC "from scratch" and that
included installing GitExtensions from a downloaded installer (2.26).
All good.

I fired up GitExt and wanted to pull down all the work our team had
going so far. We have a "shared" repo on a common file share. So
when I fired up GitExt, I chose "Clone repository" from the Common
Actions link. I picked our shared repo as the repository to clone and
selected a folder on my local hard drive. However, there's this
Branch dropdown where you can apparently only pick one branch.
Hmmm... so I selected our "develop" branch, and away it went and pull
that down.

OK, but there are many "feature" branches in that shared repo. If I
fire up a Git Bash window I can enter:
> git branch
* develop

Right, that makes sense. I cloned that one develop branch and that's
what I got. If I enter
> git branch -r

I do indeed see a nice and complete list of branches (e.g. origin/
master and orgin/featureNameHere etc.)

How do I get all the branches down to my "local" repo?

William Swanson

unread,
Dec 15, 2011, 3:48:48 PM12/15/11
to gitext...@googlegroups.com
On Thu, Dec 15, 2011 at 12:42 PM, M Noreen <ma...@on2morning.com> wrote:
> How do I get all the branches down to my "local" repo?

Those branches have already been downloaded to your computer; all you
need to do now is create local branches to track them. The easiest way
I know of is to just do "git checkout featureNameHere." Since a branch
called "featureNameHere" doesn't exist, git will create one and point
it at "origin/featureNameHere".

-William Swanson

M Noreen

unread,
Dec 16, 2011, 9:27:44 AM12/16/11
to GitExtensions
Thank you, that worked just fine. I tried the Checkout command in the
GitExt UI (rather than typing it in on a bash commandline). And that
popped up a window where I could choose Remote branches, then choose
the branch name. It worked great! You learn something new every day!

Reply all
Reply to author
Forward
0 new messages