On Wed, 8 Aug 2012 20:45:51 -0700 (PDT)
THUFIR HAWAT <hawat.thu...@gmail.com> wrote:

> There's no syntax for cloning all branches for a repo?
> 
> How do you at least clone multiple branches?  I tried:
[...]
> and a few variants, I can't find the syntax in "git help clone"
As you have been already told, you should make yourself comfortable
with the concept of remote branches and their interaction with your
local branches.  Read [1] for this--you will learn that cloning a
repository actually brings all the remote branches in, just they are,
well, remote, and so `git branch` without the "-a" command line option
does not show them, and that creation of a local branch "master" which
tracks the same-named remote branch is just a convenience implemented
by `git clone` (which just adds to the consusion).

I can understand your complication with this subject (everyone with a
centralized SCM background seem to have this syndrom for some time).

To help yourself absorb the ideas begind managing branches in
distributed SCMs, you should get under your skin that your remote
github repo is not really somehow special.  You could have a dozen of
remote repositories tracked by your local repository; they all could
have same-named branches, that's why the concept of "remote branches"
come into play: they're properly *namespaced* (contain the name of the
remote they came from) and Git will prevent you from changing them.

All your development happens on your *local* branches, which you
create at will, possibly basing them on certain remote branches.

1. http://git-scm.com/book/en/Git-Branching-Remote-Branches

-- 
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 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to