Skip to contentSkip to conversation

How to get a remote branch

DISCUSSION Andy 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore

Andy

author
#0 lore raw

Here's my directory structure

origin -> HEAD

         -> master
         -> develop

Right now if I issue command

git clone https://abc.com/xzy.git and do git branch

then I have an asterisk next to master.

I want to get branch develop, what command should I issue please?

Signature · 2 lines
View this message in context: http://git.661346.n2.nabble.com/How-to-get-a-remote-branch-tp5586541p5586541.html
Sent from the git mailing list archive at Nabble.com.
#1 lore raw
Quoted 6 lines · Andy

Here's my directory structure

origin -> HEAD

         -> master
         -> develop
Quoted 7 lines

Right now if I issue command

git clone https://abc.com/xzy.git and do git branch

then I have an asterisk next to master.

I want to get branch develop, what command should I issue please?

$ git checkout -b develop origin/develop

-Mathias

author
#2 lore raw

Thanks. It worked.

Signature · 2 lines
View this message in context: http://git.661346.n2.nabble.com/How-to-get-a-remote-branch-tp5586541p5588030.html
Sent from the git mailing list archive at Nabble.com.