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

Re: [PATCH] Give better 'pull' advice when pushing non-ff updates to current branch

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 24, 2012, 19:06 UTC
Message-ID
<xmqqehrdgd9z.fsf@junio.mtv.corp.google.com>
In-Reply-To
<20120424045844.GA41274@gmail.com>
Christopher Tiwald <christiwald@gmail.com> writes:
> I think that might be the way to go. I approached this from a specific
> workflow assumption. In retrospect, I can't divine the motivation of
> merge configurations well enough to avoid bad advice.

I am very sympathetic to your underlying motivation to avoid telling them to "perform a git pull to integrate the history from the other side before you push" and then getting misunderstood as if you told them to LITERALLY type "git pull<RETURN>". Depending on how the branch the user wanted to push, the approach needed to update its history so that contains the history from the other side will be different, and you need to have everything configured correctly for your case to be able to type "git pull<RETURN>" literally and get the right result. If you were trying to push one-shot into somewhere you do not usually push to, it is very likely that you would need to say "git pull $there $that", and there is no canned "Type this LITERALLY to continue" recipe that is appropriate in the advice message.

Perhaps a safer way out is to phrase the advice message in such a way that it is crystal clear to anybody halfway intelligent that there is nothing the user can cut and paste from there?

Previous: Christopher TiwaldNext: Junio C Hamano
Message 4 of 7 in “Give better 'pull' advice when pushing non-ff updates to current branch”
  1. Give better 'pull' advice when pushing non-ff updates to current branchChristopher Tiwald, Apr 23, 2012
  2. Junio C HamanoApr 24, 2012
  3. Christopher TiwaldApr 24, 2012
  4. Junio C HamanoApr 24, 2012
  5. Junio C HamanoApr 24, 2012
  6. Matthieu MoyApr 24, 2012
  7. Christopher TiwaldApr 24, 2012

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.