corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kelly <>
Subject Re: Git develop branch.
Date Fri, 19 Dec 2014 13:47:54 GMT
> On 19 Dec 2014, at 8:43 pm, jan i <> 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

PGP key: <>
(fingerprint 5435 6718 59F0 DD1F BFA0 5E46 2523 BAA1 44AE 2966)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message