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

Re: How to do a reverse rebase?

From
Johannes Sixt <j.sixt@eudaptics.com>
Date
Aug 20, 2007, 09:49 UTC
Message-ID
<46C963B7.7ABF2944@eudaptics.com>
In-Reply-To
<20070820053237.9349.qmail@science.horizon.com>
linux@horizon.com wrote:
Show 14 quoted lines
> I don't want to rebase HEAD on *that*, but rather rebase *that*
> on top of the current HEAD.
> 
> Sometimes I have a little debug hack on a branch by itself, and I
> discover that I need it again, so I want to rebase it on top of
> current development.
> 
> But there's been a LOT of development in the meantime.  And if I do
> 
> git-rebase HEAD debug_hack
> 
> git first checks out debug_hack.  This takes a while and, more
> importantly, every file modified in HEAD...debug_hack has its timestamp
> touched and make(1) insists on recompiling it.
Heh. For the same reason I also want 'git merge --into that'.

I often hack on a topic branch until it has the right shape. One of the changes touches a central file that triggers a complete recompile.

Now I want to merge the topic into master (which did not change this central file since the merge-base). Currently, I must checkout master, which touches the file, but if there existed 'merge --into' it could get away without touching the file.

-- Hannes
Previous: linux@horizon.com
Message 5 of 5 in “How to do a reverse rebase?”
  1. linux@horizon.comAug 20, 2007
  2. Shawn O. PearceAug 20, 2007
  3. Junio C HamanoAug 20, 2007
  4. linux@horizon.comAug 20, 2007
  5. Johannes SixtAug 20, 2007

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.