title: git am error: "patch does not apply"
body: <p>I am trying to move several commits from one project to the second, similar one, using git. </p>
  
  <p>So I created a patch, containing 5 commits: </p>
  
  <pre><code>git format-patch 4af51 --stdout &gt; changes.patch
  </code></pre>
  
  <p>Then move the patch to second project's folder and wants to apply the patch: </p>
  
  <pre><code>git am changes.patch 
  </code></pre>
  
  <p>...but it gives me error: </p>
  
  <pre><code>Applying: Fixed products ordering in order summary.
  error: patch failed: index.php:17
  error: index.php: patch does not apply
  Patch failed at 0001 Fixed products ordering in order summary.
  The copy of the patch that failed is found in:
     c:/.../project2/.git/rebase-apply/patch
  When you have resolved this problem, run "git am --continue".
  If you prefer to skip this patch, run "git am --skip" instead.
  To restore the original branch and stop patching, run "git am --abort".
  </code></pre>
  
  <p>So I opened the index.php, but nothing changed there. I assume some <code>&gt;&gt;&gt;&gt;&gt;&gt;&gt;</code> marks etc., like when resolving merge conflict, but no conflict was marked in the file. <code>git status</code> gave me also empty list of changed files (only <code>changes.patch</code> was there). So I run <code>git am --continue</code>, but another error appears: </p>
  
  <pre><code>Applying: Fixed products ordering in order summary.
  No changes - did you forget to use 'git add'?
  If there is nothing left to stage, chances are that something else
  already introduced the same changes; you might want to skip this patch.
  When you have resolved this problem, run "git am --continue".
  If you prefer to skip this patch, run "git am --skip" instead.
  To restore the original branch and stop patching, run "git am --abort". 
  </code></pre>
  
  <p>I am using Windows 7 and newest git version "1.9.4.msysgit.1" </p>
  
  <p>P.S. After few hours of googling, I found few solutions, but nothing works for me: </p>
  
  <hr>
  
  <pre><code>git am -3 changes.patch 
  </code></pre>
  
  <p>gives strange "sha1 information" error: </p>
  
  <pre><code>Applying: Fixed products ordering in order summary.
  fatal: sha1 information is lacking or useless (index.php).
  Repository lacks necessary blobs to fall back on 3-way merge.
  Cannot fall back to three-way merge.
  Patch failed at 0001 Fixed products ordering in order summary.
  The copy of the patch that failed is found in:
     c:/.../project2/.git/rebase-apply/patch
  When you have resolved this problem, run "git am --continue".
  If you prefer to skip this patch, run "git am --skip" instead.
  To restore the original branch and stop patching, run "git am --abort". 
  </code></pre>
  
  <hr>
  
  <pre><code>git am changes.patch --ignore-whitespace --no-scissors --ignore-space-change
  </code></pre>
  
  <p>gives first error as above: "error: patch failed: index.php:17", but no conflict marks in <code>index.php</code> was added. </p>