我做了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