我做了git fetch origin master
然後git pull origin master
這兩個命令後,當我做了git status
我得到:git的取指,然後git的拉讓我提前起源碩士/
$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 5 commits.
#
nothing to commit, working directory clean
發現這種奇怪的(因爲我現在我的地方是落後origin/master
)我再次克隆庫到其他位置,並得到了它正確,所以遠程回購協議確定。首先執行git fetch
命令,我使用聯機存儲庫更新了本地原產地/主機的權限?比git pull
本來是要再次讀取,然後合併,但我想它也沒有,不知道爲什麼。任何人都可以解釋嗎?
謝謝!
[編輯]
我更糊塗了。現在我在我的原始機器上工作,只是做了git pull origin master
。令我驚訝的是,同樣的事情再次發生。我使用了git reflog --all
建議,並且我在另一臺機器上做的一個提交沒有顯示。此提交看起來好像我在此計算機上提交的(因此再次顯示ahead of ...
消息)。按照發生的情況,從終端窗口複製/粘貼(僅省略一些個人信息)。
[email protected]:~/my_project$ git pull origin master
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From my_git_site:my_repo
* branch master -> FETCH_HEAD
Updating some_bizarre_number
Fast-forward
main.py | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
[email protected]:~/my_project$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)
「該消息意味着在你的本地主5名提交,你有沒有推到原點/主。」好。問題是我知道我的本地主人在我的出身/主人背後。這是令我困擾的事情。 – marcelocra 2013-02-08 15:57:39