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

Re: [ITCH] Redundant rebuilds when rebasing outdated branch

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Apr 1, 2025, 23:44 UTC
Message-ID
<Z-x6Zt7ljBj3RhSX@tapette.crustytoothpaste.net>
In-Reply-To
<4f142817-49a7-4079-b7b1-e54de36a6242@app.fastmail.com>
On 2025-04-01 at 10:54:15, Ramkumar Ramachandra wrote:
> I think it would be preferable to have something like 'git rebase-checkout', which in principle, creates a new branch based off 'main', cherry-picks commits off the outdated branch, and renames the fresh branch into the outdated branch's name. It should be possible to script this using the existing plumbing, but I was wondering if something like this would be useful to have in core git?

I think `git replay` might do what you want. It operates as a non-interactive rebase which leaves the working tree and index untouched, and updates no references (although it's designed to be piped to `git update-ref --stdin`). It is experimental, though.

-- 
brian m. carlson (they/them)
Toronto, Ontario, CA
Previous: Ramkumar Ramachandra
Message 2 of 2 in “[ITCH] Redundant rebuilds when rebasing outdated branch”
  1. Ramkumar RamachandraApr 1, 2025
  2. brian m. carlsonApr 1, 2025

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.