git-status报告一切都很干净,但git-pull抱怨未经分级的更改

时间:2017-10-17 23:00:49

标签: git git-pull git-status

有人可以向我解释以下输出吗?

[user@ hostname /dir]% git status
On branch master
Your branch is up-to-date with 'origin/master'.

It took 11.81 seconds to enumerate untracked files. 'status -uno'
may speed it up, but you have to be careful not to forget to add
new files yourself (see 'git help status').
nothing to commit, working directory clean
[user@ hostname /dir]% git pull
Cannot pull with rebase: You have unstaged changes.
Please commit or stash them.
[user@ hostname /dir]% git --version
git version 2.4.8
[user@ hostname /dir]%

1 个答案:

答案 0 :(得分:1)

消息本身来自git-sh-setup.shgit-pull.sh(在Git版本2.4.8中)调用以确保可以执行将运行的git pull git rebase

为什么git diff-files退出非零状态(请参阅git-sh-setup.sh中直接链接的行上方的行),即使git status表示存在没什么可承诺的。手动运行git diff-files以获得其实际输出可能具有启发性。