title: Resolving git conflicts: git mergetool doesn't work
body: <p>I need to resolve conflicts in git, but as a novice, not sure what is the most effective way.</p>
  
  <p>This is my situation:</p>
  
  <p><img src="https://i.stack.imgur.com/0tmwh.png" alt="enter image description here"></p>
  
  <p>I'm in <code>master</code> and need to commit and push all my changes.</p>
  
  <blockquote>
    <p>$ git pull:</p>
    
    <p>error: Your local changes to 'foo.cpp' would be overwritten by merge.
    Aborting. Please, commit your changes or stash them before you can merge.</p>
  </blockquote>
  
  <p>There are several conflicted files. Of course, I searched the web:</p>
  
  <p><a href="https://stackoverflow.com/questions/161813/how-do-i-fix-merge-conflicts-in-git">How to resolve merge conflicts in Git?</a></p>
  
  <p>Unfortunately, neither solutions work well. I may use stash (taking diff and make it clean) and do manual resolving, but want to use <code>git mergetool</code> or SourceTree.</p>
  
  <p>This is what I've tried:</p>
  
  <pre><code>$ git config merge.conflictstyle diff3
  $ git mergetool
  merge tool candidates: tortoisemerge emerge vimdiff
  No files need merging
  $ git mergetool -t vimdiff
  No files need merging
  $ git mergetool -t vimdiff foo
  foo.cpp: file does not need merging
  $ git diff foo.cpp
  diff --git a/foo.cpp b/foo.cpp
  index xxxxxx yyyyy
  --- a/foo.cpp
  +++ b/foo.cpp
  @@ .....
  ..... &lt;omitted&gt;
  $
  </code></pre>
  
  <p>I'm not sure what is wrong. <code>git mergetool</code> doesn't work correctly. It says no need to merge. However, it shows the differences and <code>git pull</code> reports conflict. </p>
  
  <p>Q1) How can I use <code>mergetool</code> for interactive conflict resolving or merge?</p>
  
  <p>Q2) Is it possible to use SourceTree to resolve conflicts? I tried, but it's also not intuitive.</p>
  
  <p>Thank you!</p>