why does git mergetool say “No files need merging”?

I’m trying to configure BeyondCompare4 as my difftool and mergetool in git. I’m using git version 2.5.0.windows.1. So far BeyondCompare4 is working just fine as a difftool but not as a mergetool.

From my master branch I run git mergetool branch3 and it responds with No files need merging

  • git pull and fetch fail with “fatal: The remote end hung up unexpectedly”
  • Git Release Branch with Squashed Commits
  • Capistrano deploy on windows fails with git
  • Can I have a workspace that is both a git workspace and a svn workspace?
  • How to find all refs that contain a commit in their history in git
  • add blobs or trees to a created repository using pygit2 (libgit2)?
  • But when I run git diff branch3 I can see several types of differences in one file (often on the same line). And if I just run git merge branch3 it does start the merge process and stop with a CONFLICT. So why doesn’t git mergetool work for me in the same way?

    This link suggested git config --global core.trustctime false which I tried with no luck:
    git mergetool reports "No files need merging"

    This link suggested rerere may be a problem so I tried git config --global rerere.enabled false also with no luck:
    git tells me that I Merge conflict, but also tells me that no files need merging

    This is what my .gitconfig looks like:

        tool = bc
        prompt = false
    [difftool "bc"]
        trustExitCode = true
        cmd = 'c:/program files (x86)/beyond compare 4/bcomp.exe' $LOCAL $REMOTE
        tool = bc
         prompt = false
    [mergetool "bc"]
        trustExitCode = true
        cmd = 'c:/program files (x86)/beyond compare 4/bcomp.exe' $LOCAL $REMOTE $BASE $MERGED

    I even tried modifying .gitconfig to change the bcomp4.exe path to something bogus just to see if I could get an error. If I make the change to difftool I get errors about the system not finding the path. But if I change it on the mergetool it just keeps saying “No files need merging” which leads me to believe BeyondCompare4 is not even running.

    Thanks for any ideas why git mergetool is stopping early with that message.

  • Git List of Remote Branches
  • Push commits to another branch
  • Shell script to check git for changes and then loop through changed files?
  • Error finding tcl.init when running Git GUI
  • avoid timestamps in git
  • Git Pre-Commit Using Sed To Dynamically Inject Branch Name
  • One Solution collect form web for “why does git mergetool say “No files need merging”?”

    You should use git mergetool when you are in a state where you need to resolve conflicts, that is, after a merge results in a conflict.

    git checkout master
    git merge branch3
    # the merge reports conflicts which we need to resolve
    git mergetool
    git add -u
    git commit -m "a merge commit message"

    More about resolving conflicts with meregetool can be found at https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging#Basic-Merge-Conflicts

    Consult git help mergetool for options.

    Git Baby is a git and github fan, let's start git clone.