From: "Randall S. Becker" <rsbecker@nexbridge.com>
To: "'Robert Dailey'" <rcdailey.lists@gmail.com>,
"'Git'" <git@vger.kernel.org>
Subject: RE: Why does `pull.rebase` default to `false`?
Date: Fri, 28 Feb 2020 13:54:20 -0500 [thread overview]
Message-ID: <00f101d5ee68$7fa0ed00$7ee2c700$@nexbridge.com> (raw)
In-Reply-To: <CAHd499DC7pOB3kD7nAG79GrufKrV-8p4vSZ5ZEPQb5gdXrNakg@mail.gmail.com>
On February 28, 2020 1:15 PM, Robert Dailey wrote:
> To: Git <git@vger.kernel.org>
> Subject: Why does `pull.rebase` default to `false`?
>
> This is more of a question of practicality. Literally all of the team and project
> workflows I've experienced have demanded that `git pull` actually perform a
> rebase of your local commits, as opposed to introducing a merge commit.
> This means setting `pull.rebase` to `true`. I can't think of a practical, day-to-
> day use case for wanting merge commits after a pull. Since the subject
> commits of the rebase are always local, there's no harm to anything
> upstream since they haven't been pushed yet.
>
> 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!
Coming at this from the pull.rebase=false camp, we do not use rebase except in extenuating circumstances in our workflows to correct a poorly constructed commit chain. Merge is almost always preferable. Our topic branches are shared with our BitBucket and Gitlab instances so others can see and learn what is going on - so changes are not strictly local (commit/push is preferred at end of day in case of machine crash/loss from an overnight OS update - happened to our team twice last year). Some of our longer duration topic branches have evolved into temporary sub-integration streams with their own Pull requests until they are finally closed back to master. Random rewriting of history, even on topic branches, would confuse the SHA out of everyone. To us, a merge on a topic branch indicates an explicit "catch up" from origin, which would otherwise require detective work, inferences, and analysis after someone else tries to make sense of what a rebase did prior to a Pull request. There is
then also the risk that your Pull request will include irrelevant commits that were already covered by a prior Pull request because signatures have changed since the common merge point - while the diff effect and signatures at the end are the same, the parent commit chains can be longer and less reflective of the actual work being done - and screws up our change metrics something terrible, making it look like we are change code far more than we actually are. The rebase paradigm may have worked for other VCS systems (thinking of ClearCase here), but requiring rebase on pull would make that git workflow unpalatable.
One thing really important in context is that we never work on master locally, and only work on our main development/integration branch during release packaging activities if a topic branch will not work nicely - restricted set of people. We secure all main branches (in GitFlow), to prevent push/rewrite. Everything has to go through a Pull request. Our policy is that developers have to do their work on their own personal topic branches. That applies to shared fix branches also, which take in a GitFlow methodology while they exist.
My $0.02 and opinion,
Randall
next prev parent reply other threads:[~2020-02-28 18:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-28 18:15 Why does `pull.rebase` default to `false`? Robert Dailey
2020-02-28 18:54 ` Randall S. Becker [this message]
2020-02-28 18:56 ` Elijah Newren
2020-02-28 20:17 ` Junio C Hamano
2020-02-28 21:10 ` Konstantin Tokarev
2020-02-28 21:22 ` Robert Dailey
2020-02-28 21:46 ` Konstantin Tokarev
2020-02-28 21:53 ` Alex Henrie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='00f101d5ee68$7fa0ed00$7ee2c700$@nexbridge.com' \
--to=rsbecker@nexbridge.com \
--cc=git@vger.kernel.org \
--cc=rcdailey.lists@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).