git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Change checkout remotely.

From
Paolo Bonzini <bonzini@gnu.org>
Date
Sep 8, 2008, 15:47 UTC
Message-ID
<48C54907.4040408@gnu.org>
In-Reply-To
<f5cc88f60809080842l34760997r4b821a79e7727d91@mail.gmail.com>
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
Previous: Marcello Henrique
Message 4 of 4 in “Change checkout remotely.”
  1. Marcello HenriqueSep 8, 2008
  2. Shawn O. PearceSep 8, 2008
  3. Marcello HenriqueSep 8, 2008
  4. Paolo BonziniSep 8, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.