Hi Thufir..

On Thu, Aug 9, 2012 at 9:15 AM, THUFIR HAWAT <hawat.thu...@gmail.com> wrote:
> There's no syntax for cloning all branches for a repo?

>From what I understand, cloning a git repo basically gets you the
entire git repository - which means that you get all branches..

> How do you at least clone multiple branches?  I tried:
> thufir@dur:~/NetBeansProjects$
> thufir@dur:~/NetBeansProjects$ git clone -b master -b
> 4.GUI_loading_messages_slowly g...@github.com:THUFIR/USENET.git
> Cloning into USENET...
> remote: Counting objects: 3782, done.
> remote: Compressing objects: 100% (1274/1274), done.
> remote: Total 3782 (delta 1647), reused 3613 (delta 1478)
> Receiving objects: 100% (3782/3782), 388.55 KiB | 79 KiB/s, done.
> Resolving deltas: 100% (1647/1647), done.
> thufir@dur:~/NetBeansProjects$
> thufir@dur:~/NetBeansProjects$ cd USENET
> thufir@dur:~/NetBeansProjects/USENET$ git branch
> * 4.GUI_loading_messages_slowly
> thufir@dur:~/NetBeansProjects/USENET$
> and a few variants, I can't find the syntax in "git help clone"

'git clone -b <branchname> ...' basically means to checkout
<branchname> (in a non-bare repository), instead of whatever was being
pointed to by HEAD in the cloned repository. This does NOT mean that
git will get only the <branchname> branch and not others...

After cloning, just to 'git branch -r' to see a list of all
remote-tracking branches - i.e. all branches that existed in the
cloned repo when you had cloned it...

Hope that helps..


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to