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, 15:44 UTC
Message-ID
<CAK3OfOhFzbUA7gZbox84W=VC+0aSuiNc-XRP_MTyYy1UeFFzZQ@mail.gmail.com>
In-Reply-To
<87r4147agk.fsf@osv.gnss.ru>
On Tue, Jul 29, 2014 at 4:58 AM, Sergei Organov <osv@javad.com> wrote:
Show 11 quoted lines
> Nico Williams <nico@cryptonector.com> writes:
>> That exception aside, keeping all local commits "on top" by always
>> rebasing them onto the upstream is extremely useful: a) in simplifying
>> conflict resolution, b) making it easy to identify as-yet-unintegrated
>> local commits, c) making it easy to contribute local commits.
>
> But 'pull --rebase=preserve' does rebase local commits onto the
> upstream, and result is exactly the same as 'pull --rebase=true', unless
> you have some of your own merges to be rebased. That's where the
> difference between these two options appears. It's --rebase=false that
> performs merges rather than rebase.

Local merge commits mean that you either didn't rebase to keep all your local commits on top of the upstream, or that you have multiple upstreams (the example exception I gave).

Conversely, if you always rebase your local commits on top of the upstream then you won't have merge commits to worry about.

Nico --

Previous: Sergei OrganovNext: Philip Oakley
Message 3 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.