# How to get a remote branch

3 messages from 2010-09-30 to 2010-09-30. Participants: Andy, Mathias Lafeldt.
Thread: https://gitlist.dev/t/25294

## Andy, 2010-09-30 04:13

Subject: How to get a remote branch
Message-ID: <1285819987771-5586541.post@n2.nabble.com>
URL: https://gitlist.dev/e/1285819987771-5586541.post%40n2.nabble.com

```

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?
-- 
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.

```

## Mathias Lafeldt, 2010-09-30 07:48

Subject: Re: How to get a remote branch
Message-ID: <4CA440E4.3080203@debugon.org>
URL: https://gitlist.dev/e/4CA440E4.3080203%40debugon.org
In-Reply-To: <1285819987771-5586541.post@n2.nabble.com>

```
Andy wrote:
> 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?

$ git checkout -b develop origin/develop

-Mathias

```

## Andy, 2010-09-30 14:42

Subject: Re: How to get a remote branch
Message-ID: <1285857765946-5588030.post@n2.nabble.com>
URL: https://gitlist.dev/e/1285857765946-5588030.post%40n2.nabble.com
In-Reply-To: <4CA440E4.3080203@debugon.org>

```

Thanks. It worked.
-- 
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.

```
