title: git - set KDiff3 as default mergetool
body: <p>After installing <code>KDiff3</code> for managing conflicts in <code>git</code>, still the default one is opening for me:</p>
  
  <p><a href="https://i.stack.imgur.com/3s78C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3s78C.png" alt="enter image description here"></a></p>
  
  <p>Here is the configuration that mentioned in this <a href="https://stackoverflow.com/a/33348841/4055329">answer</a>:</p>
  
  <pre><code>git config --global --add merge.tool kdiff3
  git config --global --add mergetool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe"
  git config --global --add mergetool.kdiff3.trustExitCode false
  
  git config --global --add diff.guitool kdiff3
  git config --global --add difftool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe"
  git config --global --add difftool.kdiff3.trustExitCode false
  </code></pre>
  
  <p><strong>NOTE:</strong> I can be able to run <code>KDiff3</code> individually with simple files, but I can't run it in my git project. Any idea?</p>
  
  <p><strong>Edit:</strong> Here is my .gitconfig :</p>
  
  <pre><code>[user]
      email = vahid.vdn@gmail.com
      name = vahid najafi
  [diff]
      tool = kdiff3
      guitool = kdiff3
  [merge]
      tool = diffmerge
      tool = kdiff3
      tool = kdiff3
  [mergetool "diffmerge"]
      trustExitCode = true
  [mergetool "kdiff3"]
      path = C:/Program Files/KDiff3/kdiff3.exe
      trustExitCode = false
  [difftool "kdiff3"]
      path = C:/Program Files/KDiff3/kdiff3.exe
      trustExitCode = false
  </code></pre>