Code

push: mention "git pull" in error message for non-fast forwards
authorMatthieu Moy <Matthieu.Moy@imag.fr>
Mon, 2 Aug 2010 13:42:44 +0000 (15:42 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Aug 2010 01:06:07 +0000 (18:06 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/push.c

index f4358b9d230f6d8d7a9a67fdfbc60279c5ec71ee..69bc2f27ac414ce3532f6babcc68671b0b95d65a 100644 (file)
@@ -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;