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

Re: How to do a reverse rebase?

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 20, 2007, 06:33 UTC
Message-ID
<7vr6ly90li.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20070820055809.GZ27913@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
>> Is there an easier way?
>
> I don't think so.  To do the merge of those files we need a working
> directory to operate in; that working directory is the one you have.

Actually, if the rebase is really tine compared to the differences between the branches, we _could_ do that without using the real work tree.

Prepare a "for rebase" index, with an empty temporary directory as the work tree, and use the merge machinery to do the necessary per-path and contents merge all inside that temporary directory. As the merge machiery is designed to be usable inside an empty directory and treat "missing" work tree files as if they are unchanged since index, the checkout in this temporary directory would be kept to the minimum.

Previous: Shawn O. PearceNext: linux@horizon.com
Message 3 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.