[英]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.