# Change checkout remotely.

4 messages from 2008-09-08 to 2008-09-08. Participants: Marcello Henrique, Shawn O. Pearce, Paolo Bonzini.
Thread: https://gitlist.dev/t/15428

## Marcello Henrique, 2008-09-08 15:42

Subject: Change checkout remotely.
Message-ID: <f5cc88f60809080842l34760997r4b821a79e7727d91@mail.gmail.com>
URL: https://gitlist.dev/e/f5cc88f60809080842l34760997r4b821a79e7727d91%40mail.gmail.com

```
Hello,

Is it possible change checkout another work tree remotely and refresh all files?

For example: git remote other checkout other-branch-x

Thanks!
--
Marcello Henrique
Associação Software Livre de Goiás (www.aslgo.org.br)
Cercomp - UFG (www.cercomp.ufg.br)

```

## Shawn O. Pearce, 2008-09-08 15:45

Subject: Re: Change checkout remotely.
Message-ID: <20080908154539.GF10252@spearce.org>
URL: https://gitlist.dev/e/20080908154539.GF10252%40spearce.org
In-Reply-To: <f5cc88f60809080842l34760997r4b821a79e7727d91@mail.gmail.com>

```
Marcello Henrique <faraohh@gmail.com> wrote:
> 
> Is it possible change checkout another work tree remotely and refresh all files?
> 
> For example: git remote other checkout other-branch-x

ssh otherhost cd otherdir '&&' git checkout other-branch-x

-- 
Shawn.

```

## Paolo Bonzini, 2008-09-08 15:47

Subject: Re: Change checkout remotely.
Message-ID: <48C54907.4040408@gnu.org>
URL: https://gitlist.dev/e/48C54907.4040408%40gnu.org
In-Reply-To: <f5cc88f60809080842l34760997r4b821a79e7727d91@mail.gmail.com>

```
Marcello Henrique wrote:
> Hello,
> 
> Is it possible change checkout another work tree remotely and refresh all files?
> 
> For example: git remote other checkout other-branch-x

Yes, either

   git checkout origin/other-branch

or if you want to work on your own local branch, starting from the
remote tree:

   git checkout -b my-branch origin/other-branch

and "git pull" (or "git pull --rebase") when you want to synchronize
with upstream.

Paolo

```

## Marcello Henrique, 2008-09-08 15:53

Subject: Re: Change checkout remotely.
Message-ID: <f5cc88f60809080853p43f723ffi3ea4bdc826e168f4@mail.gmail.com>
URL: https://gitlist.dev/e/f5cc88f60809080853p43f723ffi3ea4bdc826e168f4%40mail.gmail.com
In-Reply-To: <20080908154539.GF10252@spearce.org>

```
On Mon, Sep 8, 2008 at 12:45, Shawn O. Pearce <spearce@spearce.org> wrote:
> Marcello Henrique <faraohh@gmail.com> wrote:
>>
>> Is it possible change checkout another work tree remotely and refresh all files?
>>
>> For example: git remote other checkout other-branch-x
>
> ssh otherhost cd otherdir '&&' git checkout other-branch-x

This form is over ssh and over http?

Thank for quickly!
-- 
Marcello Henrique
Associação Software Livre de Goiás (www.aslgo.org.br)
Cercomp - UFG (www.cercomp.ufg.br)

```
