Git pull: error: Entry foo not uptodate. Cannot merge

This may happen if you update the index to ignore certain files:

git update-index --assume-unchanged <file>

and then for instance checkout some other branch:

git checkout <branch>
> error: Entry '<file>' not uptodate. Cannot merge.

Forcing index refresh fixes the issue:

git update-index --really-refresh
<file>: needs update

Followed by:

git reset --hard 

And then everything should be back to normal.

Leave a Comment