Skip to content

Commit 452c6d5

Browse files
moygitster
authored andcommitted
push: mention "git pull" in error message for non-fast forwards
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9874606 commit 452c6d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/push.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ static int push_with_options(struct transport *transport, int flags)
130130

131131
if (nonfastforward && advice_push_nonfastforward) {
132132
fprintf(stderr, "To prevent you from losing history, non-fast-forward updates were rejected\n"
133-
"Merge the remote changes before pushing again. See the 'Note about\n"
134-
"fast-forwards' section of 'git push --help' for details.\n");
133+
"Merge the remote changes (e.g. 'git pull') before pushing again. See the\n"
134+
"'Note about fast-forwards' section of 'git push --help' for details.\n");
135135
}
136136

137137
return 1;

0 commit comments

Comments
 (0)