Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git mergetool reports "No files need merging"

Tags:

git

git-merge

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/* 
like image 485
Christopher Pickslay Avatar asked Oct 21 '11 19:10

Christopher Pickslay


People also ask

How do I resolve merge conflicts in Mergetool git?

We can manually resolve the merge conflict by editing the content in the bottom pane, and then saving the file using :wqa (Write and Quit all files). Once the conflict resolution is successful, the merged file will be staged for commit. git commit -m 'Merged from multiple branches' .

How do I stop git from auto merging?

Restore the unwanted files then with git checkout -- filename . @marckassy: But you could then git reset HEAD and git add -p to select what you want. To shut off the initial merge completely, add -s ours .


1 Answers

This fixed it for me:
git mergetool .

I found this fix here

like image 117
Josh Avatar answered Oct 05 '22 20:10

Josh