git push merge error, but git pull is already up-to-date. Tried reclone, same problem.

Posted by Jasie on Stack Overflow See other posts from Stack Overflow or by Jasie
Published on 2010-04-11T08:59:01Z Indexed on 2010/04/11 9:23 UTC
Read the original article Hit count: 737

Filed under:

I do:

git commit .

git push

error: Entry 'file.php' not uptodate. Cannot merge.

Then I do

git pull

Already up-to-date.

What do I do? I just want to get the latest version from the remote copy, and overwrite anything on my local copy.

Edit: I tried everything. I deleted my local repo, and

git clone ssh://[email protected]/directory

...

Checking out files: 100%, done.

git status

On branch master

nothing to commit (working directory clean)

All looks good, right? Pull just in case.

git pull

Already up-to-date.

I make a one line change in a file to see if I can push it.

git commit .

[master 1e18af1] Rando change

1 files changed, 2 insertions(+), 0 deletions(-)

git push

Counting objects: 13, done.

Delta compression using up to 2 threads.

Compressing objects: 100% (6/6), done.

Writing objects: 100% (7/7), 646 bytes, done.

Total 7 (delta 3), reused 0 (delta 0)

From /directory

d6d61aa..1e18af1  master     -> origin/master

error: Entry 'someotherfile.php' not uptodate. Cannot merge.

Updating b8f9a54..1e18af1

To ssh://[email protected]/directory

d6d61aa..1e18af1 master -> master

I have no idea what's going on! How can I commit/pull again normally? Thanks very much!

© Stack Overflow or respective owner

Related posts about git