git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Henrie <alexhenrie24@gmail.com>
To: Elijah Newren <newren@gmail.com>
Cc: Tao Klerks <tao@klerks.biz>,
	Tao Klerks via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] pull: conflict hint pull.rebase suggestion should offer "merges" vs "true"
Date: Mon, 20 Feb 2023 11:33:01 -0700	[thread overview]
Message-ID: <CAMMLpeSZs8DqrN6_F9-eg7fcbjV-O5+3V+hUsOhyd0x10xsCaQ@mail.gmail.com> (raw)
In-Reply-To: <CABPp-BEtXf9ja7Ec1fZ=BZwFDa+50zSAhtm3nN_=k+Nc2c=RXw@mail.gmail.com>

On Sun, Feb 5, 2023 at 9:41 AM Tao Klerks via GitGitGadget
<gitgitgadget@gmail.com> wrote:
>
> From: Tao Klerks <tao@klerks.biz>
>
> Unfortunately, this rebase configuration can easily lead to non-expert users
> accidentally rebasing not their own commits, instead others' commits, if the
> new commits they have locally before the "pull" include a merge of another
> branch, eg "main".

On Mon, Feb 20, 2023 at 10:21 AM Elijah Newren <newren@gmail.com> wrote:
>
> When we teach new folks about git, and get to rebasing, there is a
> simple and easy rule to tell users: don't mix merges and rebases.
> (There's a minor exception there in that merges with the upstream
> branch are fine and rebasing can let you get rid of those otherwise
> ugly-and-frequent back-merges that users sometimes make.)

The "minor exception" is merging a topic branch into main, right? And
the "ugly-and-frequent back-merges" are the merges from main into a
topic branch?

Tao, the primary motivation behind the `git pull` warning was to help
prevent users from merging main into a topic branch when that's not
what they really want to do. The fact that novices sometimes do that
has been a point of pain for many people, including Linus Torvalds:
See "Don't merge upstream code at random points" at [1] and "github
creates absolutely useless garbage merges" at [2].

If you're seeing users merge main into topic branches without a good
reason, that does sound like more of an education problem than a
bad-defaults problem. We might still want to change the default to
better support the more unusual cases, but if you're going for a quick
win, it would be faster to teach users the wisdom of not mixing rebase
and merge in the first place.

-Alex

[1] https://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html
[2] https://lore.kernel.org/lkml/CAHk-=wjbtip559HcMG9VQLGPmkurh5Kc50y5BceL8Q8=aL0H3Q@mail.gmail.com/

  reply	other threads:[~2023-02-20 18:33 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-05 16:24 [PATCH] pull: conflict hint pull.rebase suggestion should offer "merges" vs "true" Tao Klerks via GitGitGadget
2023-02-16  3:22 ` Alex Henrie
2023-02-16 12:31   ` Tao Klerks
2023-02-17  3:15     ` Alex Henrie
2023-02-17 11:15       ` Tao Klerks
2023-02-17 18:56         ` Alex Henrie
2023-02-17 17:39       ` Junio C Hamano
2023-02-18  3:17       ` Elijah Newren
2023-02-18 16:39         ` Phillip Wood
2023-02-20  8:03           ` Tao Klerks
2023-02-20 16:45             ` Phillip Wood
2023-02-20 16:56             ` Elijah Newren
2023-02-21 14:04               ` Tao Klerks
2023-02-22 14:27             ` Sergey Organov
2023-02-24  7:06               ` Elijah Newren
2023-02-24 22:06                 ` Sergey Organov
2023-02-24 23:59                   ` Elijah Newren
2023-02-25 15:15                     ` Sergey Organov
2023-02-25 16:28                       ` Elijah Newren
2023-02-26  9:29                         ` Sergey Organov
2023-02-27 15:20                           ` Elijah Newren
2023-02-27 17:17                             ` Sergey Organov
2023-02-28  2:35                               ` Elijah Newren
2023-02-20 16:46           ` Elijah Newren
2023-02-20  6:01         ` Tao Klerks
2023-02-20 17:20           ` Elijah Newren
2023-02-20 18:33             ` Alex Henrie [this message]
2023-02-21 15:40               ` Tao Klerks
2023-02-21 17:45                 ` Alex Henrie
2023-02-21 15:01             ` Tao Klerks
2023-02-24  7:06               ` Elijah Newren
2023-02-28 14:13     ` Felipe Contreras
2023-02-28 20:04       ` Alex Henrie
2023-03-01 12:46         ` Felipe Contreras

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=CAMMLpeSZs8DqrN6_F9-eg7fcbjV-O5+3V+hUsOhyd0x10xsCaQ@mail.gmail.com \
    --to=alexhenrie24@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=newren@gmail.com \
    --cc=tao@klerks.biz \
    /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).