For some reason lately, every time I pull and get a merge conflict, running git mergetool
reports "No files need merging":
$ git pull
First, rewinding head to replay your work on top of it...
Applying: replaced home button with Cancel
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
error: Your local changes to the following files would be overwritten by merge:
Classes/Controllers/HomeController.m
Please, commit your changes or stash them before you can merge.
Aborting
Failed to merge in the changes.
Patch failed at 0002 moved rollback into cancel button in log watching
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To check out the original branch and stop rebasing run "git rebase --abort".
$ git mergetool
No files need merging
If I run git rebase --abort
and pull again, either the same thing happens on a different conflict, or the pull succeeds with no merge conflict. There are no remote changes between these pulls, so it's not as though the conflict went away.
Here's how this branch and the remote are configured:
[branch "develop"]
remote = origin
merge = refs/heads/develop
rebase = true
[remote "origin"]
url = <my repo url>
fetch = +refs/heads/*:refs/remotes/origin/*
git status
andgit ls-files -u
report? – Milkfishbranch.autosetuprebase
orbranch.<name>.rebase
set, sincegit pull
is causing a rebase - however, in my version of git it will refuse to pull with rebase if you have local changes, as the error message you quote indicates that you do. – Milkfishautosetuprebase
for a while, but only recently run into this issue. Normally I pull, and if there's a merge conflict, I can always rungit mergetool
. – Preussenerror: Your local changes to the following files would be overwritten by merge
. If you're using a Mac, perhaps this answer to a similar question will fix it for you. – Milkfish