Git says a file is unmerged and I can't commit, but the file seems to be merged Git says a file is unmerged and I can't commit, but the file seems to be merged git git

Git says a file is unmerged and I can't commit, but the file seems to be merged


I can't tell you what's wrong, but you might try

git reset app/models/disclosure_even.rbgit add app/models/disclosure_even.rb

and then commit.


I had exactly the same situation today on branches merging (not rebasing).

I spot, that file it errors on, in your case:

U      app/models/disclosure_event.rb

was absent in git status. But is could be seen as unmerged in gitk GUI. It also was absent in working copy (moved to another place in my case).

I tried git rm, and it solved the problem:

git rm app/models/disclosure_event.rb


Set the remote is origin and the branch is master, and say you already have master checked out, might try the following:

git fetch origingit reset --hard origin/master

It will set the current branch and points it to the HEAD of the remote branch.