threads / discuss / 15428

Change checkout remotely.

Subject: Change checkout remotely.

## tl;dr

4 messages between Sep 8, 2008 and Sep 8, 2008.

replies: 3people: 3as markdown or json

Marcello Henrique· Sep 8, 2008, 15:42 UTC · lore
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· Sep 8, 2008, 15:45 UTC · re: Marcello Henrique · lore

Re: Change checkout remotely.

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.
Marcello Henrique· Sep 8, 2008, 15:53 UTC · re: Shawn O. Pearce · lore

Re: Change checkout remotely.

On Mon, Sep 8, 2008 at 12:45, Shawn O. Pearce <spearce@spearce.org> wrote:
Show 7 quoted lines
> 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)
Paolo Bonzini· Sep 8, 2008, 15:47 UTC · re: Marcello Henrique · lore

Re: Change checkout remotely.

Marcello Henrique wrote:
Show 5 quoted lines
> 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

← back to recent threads