git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: git@vger.kernel.org, gitster@pobox.com
Cc: Matthieu Moy <Matthieu.Moy@imag.fr>
Subject: [PATCH] push: mention "git pull" in error message for non-fast forwards
Date: Mon,  2 Aug 2010 15:42:44 +0200	[thread overview]
Message-ID: <1280756564-3932-1-git-send-email-Matthieu.Moy@imag.fr> (raw)

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;
-- 
1.7.2.1.28.g41d92

             reply	other threads:[~2010-08-02 13:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-02 13:42 Matthieu Moy [this message]
2010-08-02 19:12 ` [PATCH] push: mention "git pull" in error message for non-fast forwards Jonathan Nieder
2010-08-02 19:52   ` Matthieu Moy
2010-08-02 22:11   ` Junio C Hamano
2010-08-05 13:14     ` Matthieu Moy
2010-08-12 10:03 ` Matthieu Moy
2010-08-12 19:28   ` Jonathan Nieder
2010-08-15 17:34   ` Matthieu Moy

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=1280756564-3932-1-git-send-email-Matthieu.Moy@imag.fr \
    --to=matthieu.moy@imag.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).