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

Re: Why does `pull.rebase` default to `false`?

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 28, 2020, 20:17 UTC
Message-ID
<xmqq8skmeabd.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CABPp-BGrwNf9p6Ayu=A4CF9ydww8tQfvzFqFO1rNm-QG55yG6w@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 18 quoted lines
> On Fri, Feb 28, 2020 at 10:17 AM Robert Dailey <rcdailey.lists@gmail.com> wrote:
>> ...
>> I'm sure there are edge cases that explain why the default is `false`,
>> but I'd argue that it is likely a case of the minority concerns
>> becoming an inconvenience for the majority of users.
>>
>> Thanks in advance for any enlightenment!
>
> The default of pull.rebase being false makes a lot of sense for Linus
> or any of his lieutenants, or any one else in an integrator-like
> workflow.
> ...
> We may want to do something similar with pull.rebase (only let it
> succeed if it's a fast-forward by default, otherwise require the user
> to set pull.rebase first?), but I don't want to have to think through
> the details or work on such a transition -- I'm just commenting with
> some thoughts that might help you understand the current state.  And
> others probably have more details than me.

While it is true that it would make no sense for integrators to rebase (in fact it would be a grave sin for them to do so), I do not think the choice of the default has much to do with it.

Whether you keep your work on topic branches, or you only work on a single thing at a time and use master for it, an individual contributor who is working on a project (be it small or large) can do 'pull --rebase' on each topic branch to keep up with the updated upstream, but it quickly becomes unpleansant once the topics start to get interrelated. And at that point, leaving your 'master' clean and only run "pull --ff-only" there, and after doing it once, rebasing your multiple topics locally on top of the updated upstream (or your 'master', which is a clean copy of it), would start to make more sense. And once you start doing that, the only 'pull' you'd do would be 'pull --ff-only', and at that point the default value of pull.rebase no longer matters.

Sarcastically put, setting pull.rebase=true may become a way to ensure that a newbie stays a newbie who does not learn to juggle multiple related branches, because only the simplest thing becomes easier with the setting.

Previous: Elijah NewrenNext: Konstantin Tokarev
Message 4 of 8 in “Why does `pull.rebase` default to `false`?”
  1. Robert DaileyFeb 28, 2020
  2. Randall S. BeckerFeb 28, 2020
  3. Elijah NewrenFeb 28, 2020
  4. Junio C HamanoFeb 28, 2020
  5. Konstantin TokarevFeb 28, 2020
  6. Robert DaileyFeb 28, 2020
  7. Konstantin TokarevFeb 28, 2020
  8. Alex HenrieFeb 28, 2020

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.