被最新的'混淆git工作流中的消息

时间:2016-10-05 08:54:14

标签: git

为什么当我可以提取更新时,git说本地主人是最新的原始/主人?

[rails-app (dev)]$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
[rails-app (master)]$ git pull origin master
remote: Counting objects: 13, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 13 (delta 11), reused 0 (delta 0)
Unpacking objects: 100% (13/13), done.
From bitbucket.org:account-name/rails-app
 * branch            master     -> FETCH_HEAD
   2f2fcc0..b3e3bed  master     -> origin/master
Updating 2f2fcc0..b3e3bed
Fast-forward
 app/assets/stylesheets/application.scss | 7 -------
 app/mailers/reminder_mailer.rb          | 2 ++
 config/routes.rb                        | 2 --
 3 files changed, 2 insertions(+), 9 deletions(-)

1 个答案:

答案 0 :(得分:3)

因为origin/master是远程的“最后已知状态”,不一定是远程的当前状态。如果您先git fetch然后git status,您会看到一条消息,表明您落后于origin/master