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

Re: Weird merge records

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 7, 2023, 20:34 UTC
Message-ID
<CAMP44s23Qsw3behbm57BNKeT9w_u1OunV04A9uzz85rDcD_Uug@mail.gmail.com>
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:
Show 5 quoted lines
> 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
Previous: Thomas GuyotNext: Dan Stromberg
Message 3 of 8 in “Weird merge records”
  1. Dan StrombergApr 28, 2023
  2. Thomas GuyotMay 6, 2023
  3. Felipe ContrerasMay 7, 2023
  4. Dan StrombergMay 8, 2023
  5. Felipe ContrerasMay 8, 2023
  6. Dan StrombergMay 8, 2023
  7. Felipe ContrerasMay 8, 2023
  8. Dan StrombergMay 8, 2023

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.