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

Re: is rebase the same as merging every commit?

From
DJDavid Jeske <jeske@willowmail.com>
Date
Aug 14, 2016, 00:43 UTC
Message-ID
<willow-jeske-01l7GnVAFEDjCe9c>
In-Reply-To
<vpqfxqz5qzj.fsf@bauges.imag.fr>
-- Matthieu Moy wrote:
Show 7 quoted lines
> > (3) If it only has (G) as a parent, does the rebase explicitly remove the
> > source A,B,C nodes from the repository?
>
> Most commands, and this includes rebase, are
> "add-only". The objects will remain unreferenced and
> will be pruned by the next git gc --prune. Unreferenced
> objects do not harm, they just eat your disk space.

I see. So it would be reasonable for the documentation to be altered slightly to show that the original nodes are still there, and that the primary difference between merging those changes one-by-one and rebasing is that rebase does not connect the new to the old. If you want to keep the old, you can toss a branch name on it, and if not, it still lives until the gc timeout.

The current docs showing those nodes missing tells me that they disappear, which is both scarry, and apparently inaccurate.

Previous: Petr Baudis
Message 5 of 5 in “is rebase the same as merging every commit?”
  1. David JeskeAug 14, 2016
  2. Matthieu MoyJun 27, 2008
  3. David JeskeJun 27, 2008
  4. Petr BaudisJun 27, 2008
  5. David JeskeAug 14, 2016

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.