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

Re: Is rebase always destructive?

From
Nick Andrew <nick@nick-andrew.net>
Date
Dec 1, 2008, 12:11 UTC
Message-ID
<20081201121140.GB32415@mail.local.tull.net>
In-Reply-To
<slrngj7jch.2srb.csaba-ml@beastie.creo.hu>
On Mon, Dec 01, 2008 at 11:41:39AM +0000, Csaba Henk wrote:
> When doing a rebase, I can find a number of reasons for which one might
> feel like to preserve the rebased branch (that is, perform an operation
> which copies the branch over a new base, not moves).
[...]
> I can't see any option for rebase which would yield this cp-like
> behaviour. Am I missing something?
How about this:

git checkout topic git branch keepme git rebase master

Your 'topic' branch will now be rebased against master, and due to the 'keepme' branch pointer at the original topic HEAD, you can see the original commits before rebasing.

Nick.
Previous: Johan HerlandNext: Csaba Henk
Message 3 of 6 in “Is rebase always destructive?”
  1. Csaba HenkDec 1, 2008
  2. Johan HerlandDec 1, 2008
  3. Nick AndrewDec 1, 2008
  4. Csaba HenkDec 1, 2008
  5. Robin RosenbergDec 1, 2008
  6. Andreas EricssonDec 1, 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.