From d92304ff5cfdca463e9ecd1345807d0b46d6af33 Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Wed, 12 Jul 2023 22:41:14 -0600 Subject: remote: don't imply that integration is always required before pushing In a narrow but common case, the user is the only author of a branch and doesn't mind overwriting the corresponding branch on the remote. This workflow is especially common on GitHub, GitLab, and Gerrit, which keep a permanent record of every version of a branch that is pushed while a pull request is open for that branch. On those platforms, force-pushing is encouraged and is analogous to emailing a new version of a patchset. When giving advice about divergent branches, tell the user about `git pull`, but don't unconditionally instruct the user to do it. A less prescriptive message will help prevent users from thinking that they are required to create an integrated history instead of simply replacing the previous history. Likewise, don't imply that `git pull` is only for merging. Signed-off-by: Alex Henrie Signed-off-by: Junio C Hamano --- remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'remote.c') diff --git a/remote.c b/remote.c index d79aae0d76..71019564d5 100644 --- a/remote.c +++ b/remote.c @@ -2325,7 +2325,7 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb, if (show_divergence_advice && advice_enabled(ADVICE_STATUS_HINTS)) strbuf_addstr(sb, - _(" (use \"git pull\" to merge the remote branch into yours)\n")); + _(" (use \"git pull\" if you want to integrate the remote branch with yours)\n")); } free(base); return 1; -- cgit v1.3