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

Re: Amending merge commits?

From
NWNico Williams <nico@cryptonector.com>
Date
Jul 29, 2014, 22:07 UTC
Message-ID
<CAK3OfOgsY43oiuUNggS+Tz2zfMKB_eO2U+S2tiNsoYGk5qhn2w@mail.gmail.com>
In-Reply-To
<9EFB89B516004883AC0FD774595B84E7@PhilipOakley>
On Tue, Jul 29, 2014 at 4:38 PM, Philip Oakley <philipoakley@iee.org> wrote:
Show 6 quoted lines
> From: "Nico Williams" <nico@cryptonector.com>
>> That workflow works just fine with git.
>
> I'm not saying that it isn't a good technique and can work well. Rather I'm
> saying we should be tolerant of the rules and techniques of others who do
> [...]

Sure. I was just giving advice as to how to avoid any problems at pull time w.r.t. local merge commits.

Better merge commit handling at pull time might be great (I'd not know; I avoid local merge commits!), but I would still strongly recommend keeping all local commits on top because otherwise you lose local history. Even if you use -m to set a better commit message, you might prefer to have kept the original N local -now rebased- commits around so you can tell what each discrete change was, even if you'll eventually squash them (you might not squash them all into one).

Show 8 quoted lines
>>  It worked really well at Sun
>> (with thousands of engineers working on Solaris alone).  And it should
>> work well for anyone who doesn't have two or more forked upstreams to
>> follow.
>
> I'm just cautious of an accidental one size fits all approach, so the
> ability to rebase lines of development which contain merge commits should be
> possible (with an appropriate and documented option) without hidden traps.

Thus far the only case I've seen where this approach doesn't work _at all_ is the case where you have multiple forked upstreams. The only other case where it doesn't work is a social problem: rebase allergy. For the repos I maintain I insist on contributed commits applying as fast forward merges, or I'll rebase them myself if need be.

Nico --

Previous: Philip OakleyNext: Sergei Organov
Message 7 of 10 in “Re: Amending merge commits?”
  1. Nico WilliamsJul 28, 2014
  2. Sergei OrganovJul 29, 2014
  3. Nico WilliamsJul 29, 2014
  4. Philip OakleyJul 29, 2014
  5. Nico WilliamsJul 29, 2014
  6. Philip OakleyJul 29, 2014
  7. Nico WilliamsJul 29, 2014
  8. Sergei OrganovJul 30, 2014
  9. Nico WilliamsJul 30, 2014
  10. Sergei OrganovJul 30, 2014

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.