> On 19 Dec 2014, at 8:43 pm, jan i <[email protected]> wrote:
> 
> Btw, I did a "git clone ......" but it only cloned master, should it not
> have taken all branches ?
> 
> the only solution I could find was "git co -b stable origin/stable", but
> for sure I missed something in the cloning (or do we still have something
> not totally correct) ?

A clone gets you the entire repository, but only creates a local branch 
corresponding to the one you checked out (in this case master). In git, a 
‘local’ branch is the one you are working on (and can commit to directly), 
while a ‘remote’ branch is the one on the server (which you push to/pull from).

If you run ‘git checkout stable’, this will create a local branch called 
stable, set up to track the remote stable branch (that is, it will keep it in 
sync when you do pull/push). This will already be the case for the master 
branch that you’ve got checked out right now. The command ‘git checkout -b 
stable origin/stable’ is almost the same but I don’t think it sets it to track 
the remote branch; you should be able to do ‘git branch —set-upstream stable 
origin/stable’ to fix this.

—
Dr Peter M. Kelly
[email protected]

PGP key: http://www.kellypmk.net/pgp-key <http://www.kellypmk.net/pgp-key>
(fingerprint 5435 6718 59F0 DD1F BFA0 5E46 2523 BAA1 44AE 2966)

Reply via email to