git mergetool reports “No files need merging”

前端 未结 7 1053
傲寒
傲寒 2020-12-05 12:57

For some reason lately, every time I pull and get a merge conflict, running git mergetool reports \"No files need merging\":

$ git pull
First, r         


        
7条回答
  •  囚心锁ツ
    2020-12-05 13:19

    Merge tools are better at resolving conflicts than stock git. It can't be too opinionated. For example Beyond Compare is syntax aware and will do a lot for you. If you have it configured right, you can just compile and run your solution to test. If it's all good, then just git add -A and git rebase --continue. What you are experiencing is normal. Double check your "trust mergetool exit code" setting:

    git config --global mergetool.trustExitCode true
    

    Note: the -A option in git add will stage all changes including deletions and new, untracked files.

提交回复
热议问题