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

Re: fetch and pull

From
Jeff King <peff@peff.net>
Date
Mar 18, 2009, 00:37 UTC
Message-ID
<20090318003752.GA25454@coredump.intra.peff.net>
In-Reply-To
<450196A1AAAE4B42A00A8B27A59278E70A3FC0A5@EXCHANGE.trad.tradestation.com>
On Tue, Mar 17, 2009 at 12:44:31PM -0400, John Dlugosz wrote:
Show 6 quoted lines
> > > You checkout master before updating it?
> > 
> > You cannot merge/rebase a branch unless it is checked out.
> > 
> Sure you can.
> 	git rebase upstream topic

This literally does a "checkout" behind the scenes, so it is still manipulating your working tree. It is basically the equivalent of:

  git checkout topic && git rebase upstream

The actual rebasing happens on a detached HEAD, but you will find at the end of such a rebase that you are now on the branch "topic".

-Peff
Previous: John Dlugosz
Message 19 of 19 in “Re: fetch and pull”
  1. John DlugoszMar 16, 2009
  2. Jay SoffianMar 16, 2009
  3. John DlugoszMar 16, 2009
  4. Sverre RabbelierMar 16, 2009
  5. Jeff KingMar 17, 2009
  6. Sverre RabbelierMar 17, 2009
  7. Jay SoffianMar 16, 2009
  8. John DlugoszMar 16, 2009
  9. Jay SoffianMar 17, 2009
  10. John DlugoszMar 17, 2009
  11. Jay SoffianMar 17, 2009
  12. John DlugoszMar 17, 2009
  13. Nanako ShiraishiMar 17, 2009
  14. Björn SteinbrinkMar 18, 2009
  15. Junio C HamanoMar 18, 2009
  16. John DlugoszMar 18, 2009
  17. Björn SteinbrinkMar 18, 2009
  18. John DlugoszMar 18, 2009
  19. Jeff KingMar 18, 2009

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.