Re: [PATCH v3 1/2] remote: advise about force-pushing as an alternative to reconciliation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alex

On 06/07/2023 05:01, Alex Henrie wrote:
Also, don't imply that `git pull` is only for merging.

While the cover letter gives some background for the reason behind this change the commit message does not explain why the proposed changes are desirable.

@@ -2323,7 +2323,10 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb,
  			base, ours, theirs);
  		if (advice_enabled(ADVICE_STATUS_HINTS))
  			strbuf_addstr(sb,
-				_("  (use \"git pull\" to merge the remote branch into yours)\n"));
+				_("  (To reconcile your local changes with the work at the remote, you can\n"

This is a welcome improvement but I think it would be better to say "integrate" rather than "reconcile" to keep the wording aligned with the advice is builtin/push.c.

+				  "  use 'git pull' and then 'git push'. To discard the work at the remote\n"
+				  "  and replace it with what you did (alone), you can use\n"
+				  "  'git push --force'.)\n"));

I share Junio's concerns about giving this advice after "git status" or "git checkout" especially as we don't know if our remote tracking ref accurately reflects the current state of the remote branch.

Best Wishes

Phillip

  	}
  	free(base);
  	return 1;



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux