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

Re: [PATCH v2] remote: qualify "git pull" advice for non-upstream branches

From
Junio C Hamano <gitster@pobox.com>
Date
May 19, 2026, 08:29 UTC
Message-ID
<xmqqbjeb7qfv.fsf@gitster.g>
In-Reply-To
<pull.2301.v2.git.git.1778665812261.gitgitgadget@gmail.com>
"Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 6 quoted lines
> From: Harald Nordgren <haraldnordgren@gmail.com>
>
> When "git status" reports the local branch is behind the push
> branch, the advice suggested a bare "git pull". That follows the
> upstream, which may live on a different remote, so emit
> "git pull <remote> <branch>" instead.

Hmph, shouldn't this be done conditionally, though? Most new users follow the recommended pattern to set branch.<name>.merge so that "git pull" would do the right thing for them, I presume, even when they are using triangular workflow to push to a different remote than the remote they pull from, so the new and more verbose message would not help the users any more than the existing message, right?

Can the code tell the situation where the extra part of the message would help and give it only then?

Previous: Harald Nordgren via GitGitGadgetNext: Harald Nordgren
Message 3 of 9 in “remote: qualify "git pull" advice for non-upstream branches”
  1. remote: qualify "git pull" advice for non-upstream branchesHarald Nordgren via GitGitGadget, May 12, 2026
  2. remote: qualify "git pull" advice for non-upstream branchesHarald Nordgren via GitGitGadget, May 13, 2026
  3. Junio C HamanoMay 19, 2026
  4. Harald NordgrenMay 20, 2026
  5. remote: qualify "git pull" advice for non-upstream compareBranchesHarald Nordgren via GitGitGadget, May 20, 2026
  6. Junio C HamanoMay 21, 2026
  7. remote: qualify "git pull" advice for non-upstream compareBranchesHarald Nordgren via GitGitGadget, May 21, 2026
  8. Junio C HamanoJun 10, 2026
  9. Harald NordgrenJun 10, 2026

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.