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

Re: [PATCH] push: mention "git pull" in error message for non-fast forwards

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Aug 12, 2010, 10:03 UTC
Message-ID
<vpqvd7gp2q6.fsf@bauges.imag.fr>
In-Reply-To
<1280756564-3932-1-git-send-email-Matthieu.Moy@imag.fr>
Hi,

I'm sorry to insist, but nothing has happened to this patch, and I'd really like it to get merged. The only reaction appart from Junio was Jonathan, and althought it contained a disgression about "if I were running the world", it started with "Your change is good." ;-).

Thanks,
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
Show 36 quoted lines
> The message remains fuzzy to include "git pull", "git pull --rebase" and
> others, but directs the user to the simplest solution in the vast
> majority of cases.
>
> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
> ---
> When the message was added, it was decided explicitely not to say
> explicitely "use git pull", first because there are other ways to
> merge, and then to encourage the users to read the docs.
>
> After a few months of teaching newbies/students to use Git, the
> question "it doesn't want to push, what shall I do" still comes in the
> top questions asked. Each time I've been asked, the newbie's face was
> enlightened by hearing just the word "pull".
>
> So I guess those few extra characters in the error message would save
> me a lot of time ;-).
>
>  builtin/push.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/builtin/push.c b/builtin/push.c
> index f4358b9..69bc2f2 100644
> --- a/builtin/push.c
> +++ b/builtin/push.c
> @@ -130,8 +130,8 @@ static int push_with_options(struct transport *transport, int flags)
>  
>  	if (nonfastforward && advice_push_nonfastforward) {
>  		fprintf(stderr, "To prevent you from losing history, non-fast-forward updates were rejected\n"
> -				"Merge the remote changes before pushing again.  See the 'Note about\n"
> -				"fast-forwards' section of 'git push --help' for details.\n");
> +				"Merge the remote changes (e.g. 'git pull') before pushing again.  See the\n"
> +				"'Note about fast-forwards' section of 'git push --help' for details.\n");
>  	}
>  
>  	return 1;
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Matthieu MoyNext: Jonathan Nieder
Message 6 of 8 in “push: mention "git pull" in error message for non-fast forwards”
  1. push: mention "git pull" in error message for non-fast forwardsMatthieu Moy, Aug 2, 2010
  2. Jonathan NiederAug 2, 2010
  3. Matthieu MoyAug 2, 2010
  4. Junio C HamanoAug 2, 2010
  5. Matthieu MoyAug 5, 2010
  6. Matthieu MoyAug 12, 2010
  7. Jonathan NiederAug 12, 2010
  8. Matthieu MoyAug 15, 2010

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.