I\'m trying to update my repo from a remote branch and keep getting this error when I do a \"git pull\". I haven\'t made any local changes, and even if I have I don\'t need
Worth a try:
Could you set, just for this update, set the config parameter core.trustctime to false?
core.trustctime
If false, the ctime differences between the index and the working copy are ignored; useful when the inode change time is regularly modified by something outside Git (file system crawlers and some backup systems).
Generally speaking, this means you have changes in your local files that haven't been committed to your local repository. You can also see this stackoverflow question for a bit more detail.
It might a problem also with file permissions. Git is versioning them too, unless config says otherwise. Just adding this answer for people who has almost but not the like problem.
I had the same error, after a situation where git status
said new file: foo.cpp
for a file not added to the staging area. i.e. under the "Changes not staged for commit" heading. Very weird, this usually doesn't happen.
Solution: git add foo.cpp
, and then git stash
worked again.
I was seeing a similar issue (Windows 10): I was on branchA
and wanted to go to master
. I had some uncommited changes so first I git stash
then git checkout -f master
but I still got the Entry 'fileName' not uptodate. Cannot merge
.
git status
wasn't showing anything to commit.
Eventually I just removed the file manually and I was able to go to the other branch (which of course made my file come back) so I guess there has been a bug within git somewhere.