Search code examples
gitwindows-7mergetortoisegit3-way-merge

How to automatically put a file as resolved after merge


I started using TortoiseGit for Windows but I found some things annoying. For example when I have a conflict during a merge I need to do the following:

  • do the 3 way merge (of course... there is no other choice)
  • mark the file as resolved

Is there an automatic way of marking the file as resolved if the merge ends successfully?

Thanks for any pointers,

Iulian


Solution

  • You will need to adjust your config to trust the exit code of your merge tool:

    git config mergetool.<tool>.trustExitCode true
    

    This assumes that the merge tool you use has an exit code that corresponds to whether or not the merge was successful or not.

    Here is more info:

    http://www.kernel.org/pub/software/scm/git/docs/git-mergetool.html

    Hope this helps.