I pulled from origin to update my local, and one file had conflicting changes. I resolved the conflict, but I can’t commit (locally) because git still thinks the file is conflicting:
$ git add style.css
This works – no errors or anything. Then:
$ git commit
Merge branch 'dev' of [origin] into dev
Conflicts:
[path]/style.css
#
# It looks like you may be committing a MERGE.
# If this is not correct, please remove the file
# .git/MERGE_HEAD
# and try again.
#
Why doesn’t this work?
Okay, so this doesn’t technically solve the original problem, but it does get around it. What I did was I backed up my changes to
style.cssand then reset my localdevbranch toorigin/dev. This resolved whatever it thought the conflict was, since local and origin were now identical, but also put my localdevbranch one commit behind in the process.So then I just diffed my backup
style.css(which had my most recent changes) against my now-current local version, merged my changes in, and committed.