[英]Why git push notification number increases for a single commit in SourceTree if I took pull after commit
MRE:
1
通知。2
。有人可以告诉我为什么吗? 那个数字代表否。 提交,或其他什么?
拉取可能导致合并提交,将您拥有的本地更改与 1 个远程更改合并。
--------------L local
--------------R remote
拉后
--------------LM local
/
--------------R remote
您现在比远程提前 2 次提交 (LM),您的原始更改 + 与远程合并。 即使您的内容现在已与遥控器同步。
另一种方法是执行 pull-rebase,这将重写您的本地历史记录以在远程重播您的更改:
---------------L local
--------------R remote
在 pull-rebase 之后:
--------------RN local
--------------R remote
L 将被重写为将 R 作为父代,并将导致新的本地提交 (N)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.