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

Re: proper way to merge?

From
John Tapsell <johnflux@gmail.com>
Date
Mar 3, 2009, 05:01 UTC
Message-ID
<43d8ce650903022101x584d7dcfr1758efc5e2c2e5cc@mail.gmail.com>
In-Reply-To
<450196A1AAAE4B42A00A8B27A59278E709F07432@EXCHANGE.trad.tradestation.com>
2009/3/2 John Dlugosz <JDlugosz@tradestation.com>:
Show 12 quoted lines
> ===Re:===
> Instead of merge, I prefer to rebase.  so:
>
> git checkout dev
> git rebase origin rel
>
> This replays each commit made in 'dev' on top of release, letting you
> fix each commit separately.  It also means that when I commit to
> release, the changes are a nice tree.
> ===end===
>
> The reason I'm doing this -- why I took over maintenance of the repository -- is because I strenuously objected to his plan to "rebase".  NO!  Merge, don't rebase.  Besides never rebasing published branches, in this case it works much better the other way around:  dev made systemic changes, and rel is mostly patches and completely new pieces of code.  After looking at what was in dev..rel and what was in rel..dev, I chose to start with dev and bring in the commits from rel in a controlled manner.

It depends on what you're doing :-) I find that if the branch is too large to easily rebase, then it's probably too large entirely :) Developers don't like master to change in large ways suddenly - makes it hard for all the other branches.

It also makes it impossible to bisect, something that I find
essential.  If you are combining two trees which are too big to easily
rebase, then there's a high chance that something will break either
due to their individual changes or because of a mistake while merging.
 In such a case, it's then impossible to bisect to try to pinpoint the
actual problem.

It will be interesting to hear your view on merging vs rebasing after a year or so of trying both.

John
Previous: John DlugoszNext: Bryan Donlan
Message 4 of 9 in “proper way to merge?”
  1. John DlugoszFeb 27, 2009
  2. John TapsellFeb 28, 2009
  3. John DlugoszMar 2, 2009
  4. John TapsellMar 3, 2009
  5. Bryan DonlanMar 2, 2009
  6. John DlugoszMar 2, 2009
  7. Johannes SixtMar 3, 2009
  8. John DlugoszMar 3, 2009
  9. Johannes SixtMar 3, 2009

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.