user8434768
user8434768

Reputation:

git-status reports everything clean but git-pull complains about unstaged changes

Could somebody explain to me the following output?

[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]%

Upvotes: 0

Views: 218

Answers (1)

torek
torek

Reputation: 489083

The message itself comes from git-sh-setup.sh, which git-pull.sh (in Git version 2.4.8) invokes to make sure that it's OK to do a git pull that will run git rebase.

What's not clear is why git diff-files is exiting with a nonzero status (see the line above the directly linked line in git-sh-setup.sh), even though git status says that there is nothing to commit. Running git diff-files manually, to get its actual output, might be enlightening.

Upvotes: 1

Related Questions