title: How can I get git rebase to complete after I resolve conflicts
body: <p>I've just tried to rebase some changes I'm submitting to a remote repository, and can't get it to complete after I resolve conflicts. I tried to rebase as follows:</p>
  
  <pre><code>$ git rebase upstream/master
  First, rewinding head to replay your work on top of it...
  Applying: My Commit Message
  Using index info to reconstruct a base tree...
  M   dir_a/dir_b/dir_c/myfile.py
  .git/rebase-apply/patch:51: trailing whitespace.
  
  .git/rebase-apply/patch:56: trailing whitespace.
  
  .git/rebase-apply/patch:128: trailing whitespace.
  
  .git/rebase-apply/patch:141: trailing whitespace.
  
  .git/rebase-apply/patch:145: trailing whitespace.
  
  warning: squelched 3 whitespace errors
  warning: 8 lines add whitespace errors.
  Falling back to patching base and 3-way merge...
  Auto-merging dir_a/dir_b/dir_c/myfile.py
  CONFLICT (content): Merge conflict in dir_a/dir_b/dir_c/myfile.py
  error: Failed to merge in the changes.
  Patch failed at 0001 My Commit Message
  The copy of the patch that failed is found in: .git/rebase-apply/patch
  
  When you have resolved this problem, run "git rebase --continue".
  If you prefer to skip this patch, run "git rebase --skip" instead.
  To check out the original branch and stop rebasing, run "git rebase --abort".
  </code></pre>
  
  <p>after resolving the conflict, I staged and committed my changes:</p>
  
  <pre><code>$ git add dir_a/dir_b/dir_c/myfile.py
  $ git commit dir_a/dir_b/dir_c/myfile.py -m"Fixed rebase conflicts"
  [detached HEAD a5a4f3b3e] Fixed rebase conflicts
   1 file changed, 193 insertions(+), 13 deletions(-)
  </code></pre>
  
  <p>But when I try to continue, it fails </p>
  
  <pre><code>$ git rebase --continue
  Applying: My Commit Message
  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 rebase --continue".
  If you prefer to skip this patch, run "git rebase --skip" instead.
  To check out the original branch and stop rebasing, run "git rebase --abort".
  </code></pre>
  
  <p>I've tried this a number of times. Sometimes with more detailed checks on which branch I'm on, only staging my conflict resolutions but not committing them, and always come back to the same point.</p>
  
  <p>For example, if I abort and don't commit before continuing to rebase, I see the same error:</p>
  
  <pre><code>$ git rebase --abort
  $ git status
  On branch rebase1
  nothing to commit, working tree clean
  </code></pre>
  
  <p>Now, I see (or believe I do) the same result when I start to rebase</p>
  
  <pre><code>$ git rebase upstream/master
  First, rewinding head to replay your work on top of it...
  Applying: My Commit Message
  Using index info to reconstruct a base tree...
  M   dir_a/dir_b/dir_c/myfile.py
  
  Falling back to patching base and 3-way merge...
  Auto-merging dir_a/dir_b/dir_c/myfile.py
  CONFLICT (content): Merge conflict in dir_a/dir_b/dir_c/myfile.py
  
  error: Failed to merge in the changes.
  Patch failed at 0001 My Commit Message
  The copy of the patch that failed is found in: .git/rebase-apply/patch
  
  When you have resolved this problem, run "git rebase --continue".
  If you prefer to skip this patch, run "git rebase --skip" instead.
  To check out the original branch and stop rebasing, run "git rebase --abort".
  </code></pre>
  
  <p>after fixing the conflict I <code>add</code> and <code>rebase</code> with the same result:</p>
  
  <pre><code>$ git add dir_a/dir_b/dir_c/myfile.py
  $ git rebase --continue
  Applying: My Commit Message
  Applying: My Commit Message For New Code I want to Rebase
  Using index info to reconstruct a base tree...
  M   dir_a/dir_b/dir_c/myfile.py
  Falling back to patching base and 3-way merge...
  Auto-merging dir_a/dir_b/dir_c/myfile.py
  CONFLICT (content): My Commit Message
  error: Failed to merge in the changes.
  Patch failed at 0002 Made changes to pass flake8
  The copy of the patch that failed is found in: .git/rebase-apply/patch
  
  When you have resolved this problem, run "git rebase --continue".
  If you prefer to skip this patch, run "git rebase --skip" instead.
  To check out the original branch and stop rebasing, run "git rebase --abort".
  </code></pre>
  
  <p>What do I need to do/not do to successfully rebase my changes?</p>