Skip to content

Commit fc6c4e9

Browse files
johnkeepinggitster
authored andcommitted
push: avoid suggesting "merging" remote changes
With some workflows, it is more suitable to rebase on top of remote changes when a push does not fast-forward. Change the advice messages in git-push to suggest that a user "integrate the remote changes" instead of "merge the remote changes" to make this slightly clearer. Also change the suggested 'git pull' to 'git pull ...' to hint to users that they may want to add other parameters. Suggested-by: Philip Oakley <[email protected]> Signed-off-by: John Keeping <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent edca415 commit fc6c4e9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

builtin/push.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ static void setup_default_push_refspecs(struct remote *remote)
204204

205205
static const char message_advice_pull_before_push[] =
206206
N_("Updates were rejected because the tip of your current branch is behind\n"
207-
"its remote counterpart. Merge the remote changes (e.g. 'git pull')\n"
208-
"before pushing again.\n"
207+
"its remote counterpart. Integrate the remote changes (e.g.\n"
208+
"'git pull ...') before pushing again.\n"
209209
"See the 'Note about fast-forwards' in 'git push --help' for details.");
210210

211211
static const char message_advice_use_upstream[] =
@@ -216,15 +216,15 @@ static const char message_advice_use_upstream[] =
216216

217217
static const char message_advice_checkout_pull_push[] =
218218
N_("Updates were rejected because a pushed branch tip is behind its remote\n"
219-
"counterpart. Check out this branch and merge the remote changes\n"
220-
"(e.g. 'git pull') before pushing again.\n"
219+
"counterpart. Check out this branch and integrate the remote changes\n"
220+
"(e.g. 'git pull ...') before pushing again.\n"
221221
"See the 'Note about fast-forwards' in 'git push --help' for details.");
222222

223223
static const char message_advice_ref_fetch_first[] =
224224
N_("Updates were rejected because the remote contains work that you do\n"
225225
"not have locally. This is usually caused by another repository pushing\n"
226-
"to the same ref. You may want to first merge the remote changes (e.g.,\n"
227-
"'git pull') before pushing again.\n"
226+
"to the same ref. You may want to first integrate the remote changes\n"
227+
"(e.g., 'git pull ...') before pushing again.\n"
228228
"See the 'Note about fast-forwards' in 'git push --help' for details.");
229229

230230
static const char message_advice_ref_already_exists[] =

0 commit comments

Comments
 (0)