![](/img/trans.png)
[英]why I don't have access to gitlab repository after doing git pull to update my local project?
[英]Why have I my local repository ahead of 1 commit after git pull?
我已經從本地存儲庫推送到我的遠程存儲庫,然后 webhook 通知 Web 服務,該服務將 git pull 拉到另一個本地存儲庫。
之后,我看到了該本地存儲庫上的更改,但是如果我執行git status
輸出是: your branch is ahead of 'origin/master' by 1 commit
有人可以向我解釋發生了什么嗎?
似乎發生的問題是:
假設You (A)
、 Remote (B)
和Another Local Repo (C)
在那里。
在 A 上有一些提交,在 C 上有一些其他提交。
您將更改從 A 推送到 B -> 您的 A 和 B 現在已同步。
同樣,當代碼或提交通過 pull 從 B 拉到 C 時,如果 C 上有任何不在 B 上的提交,git 會嘗試合並代碼。 在這個過程中,所有的變化都從 B 到 C,git 又在 C 上創建了一個提交。
1 次提交是消息的原因。 請在B
和C
執行 git log 。 我相信你在 C 中的最新提交將類似於Merge branch something of something
如果是這種情況,請告訴我。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.