git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Thomas Guyot <tguyot@gmail.com>
Cc: Dan Stromberg <strombrg@gmail.com>, git@vger.kernel.org
Subject: Re: Weird merge records
Date: Sun, 7 May 2023 15:34:30 -0500	[thread overview]
Message-ID: <CAMP44s23Qsw3behbm57BNKeT9w_u1OunV04A9uzz85rDcD_Uug@mail.gmail.com> (raw)
In-Reply-To: <a611877f-c515-033c-e015-f3952b520c08@gmail.com>

On Sat, May 6, 2023 at 10:20 AM Thomas Guyot <tguyot@gmail.com> wrote:

> You shouldn't change the user's config - you can instead use
> command-line switches with git-pull to force the desired behavior. In
> this case (which is also the default if there is no pull.rebase config)
> it will merge with the remote (and that merge will be a fast-forward if
> you have no added commits).

Actually no: it won't merge the current branch with the remote, it
will merge the remote with the current branch, which is not the same.

This is one of the many reasons many git veterans recommend most users
to simply avoid doing `git pull` [1]: it very rarely does what you
want.

[1] https://felipec.wordpress.com/2021/07/13/why-is-git-pull-broken/

-- 
Felipe Contreras

  reply	other threads:[~2023-05-07 20:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-28 15:34 Weird merge records Dan Stromberg
2023-05-06 14:43 ` Thomas Guyot
2023-05-07 20:34   ` Felipe Contreras [this message]
2023-05-08 14:53     ` Dan Stromberg
2023-05-08 15:03       ` Felipe Contreras
2023-05-08 16:53         ` Dan Stromberg
2023-05-08 17:17           ` Felipe Contreras
2023-05-08 14:54   ` Dan Stromberg

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=CAMP44s23Qsw3behbm57BNKeT9w_u1OunV04A9uzz85rDcD_Uug@mail.gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=strombrg@gmail.com \
    --cc=tguyot@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).