title: git rename/delete confusion
body: <p>I having one confusion about a particular git behavior:</p>
  
  <p>Following are the steps and situation (the list of commands are also given later):</p>
  
  <ol>
  <li>I have two branches: master and XBranch</li>
  <li>There is a file src/a.txt in both of them. It's content is "Old Content"</li>
  <li>In XBranch I rename src/a.txt to src/b.txt, using: <code>mv</code>, <code>git rm</code>, <code>git add</code>.</li>
  <li><p>In master  rename the file a.txt. During commit I did <code>git rm src/a.txt</code> but forgot to do <code>git add src/b.txt</code>
  In master I do: <code>git rm src/a.txt</code> and <code>git commit</code></p></li>
  <li><p>In master, I edit the content of the file b.txt to "<code>New Content</code></p></li>
  <li>In master I do <code>git add src/b.txt</code> and <code>git commit</code></li>
  <li>In master I do: <code>git merge XBranch</code></li>
  </ol>
  
  <p>The file src/b.txt conflicts, which is perfectly understandable.
  But the content is "<code>Old Content</code>". Why?</p>
  
  <p>Why <em>not</em> is it something like:</p>
  
  <pre><code>&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD
  New Content
  =======
  Old content
  &gt;&gt;&gt;&gt;&gt;&gt;&gt; XBranch
  </code></pre>
  
  <h1>List of Commands:</h1>
  
  <pre><code>sabya@SABYA-PC d:/merge_temp/test/case2
  $ mkdir source
  
  sabya@SABYA-PC d:/merge_temp/test/case2
  $ git init
  Initialized empty Git repository in d:/merge_temp/test/case2/.git/
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (master)
  $ mkdir src
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (master)
  $ vi src/a.txt
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (master)
  $ cat src/a.txt
  Old Content
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (master)
  $ git add src/
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (master)
  $ git commit
  [master (root-commit) 148500e] added src/a.txt
   1 files changed, 1 insertions(+), 0 deletions(-)
   create mode 100644 src/a.txt
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (master)
  $ git branch XBranch
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (master)
  $ git checkout XBranch
  Switched to branch 'XBranch'
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (XBranch)
  $ mv src/a.txt src/b.txt
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (XBranch)
  $ git rm src/a.txt
  rm 'src/a.txt'
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (XBranch)
  $ git add src/b.txt
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (XBranch)
  $ git commit
  [XBranch b3ff8fa] changed a.txt to b.txt in XBranch
   1 files changed, 0 insertions(+), 0 deletions(-)
   rename src/{a.txt =&gt; b.txt} (100%)
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (XBranch)
  $ git checkout master
  Switched to branch 'master'
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (master)
  $ mv src/a.txt src/b.txt
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (master)
  $ git rm src/a.txt
  rm 'src/a.txt'
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (master)
  $ git commit
  [master bfeaecb] removed src/a.txt
   1 files changed, 0 insertions(+), 1 deletions(-)
   delete mode 100644 src/a.txt
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (master)
  $ vi src/b.txt
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (master)
  $ cat src/b.txt
  New Content
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (master)
  $ git add src/b.txt
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (master)
  $ git commit
  [master 2361d5e] changed content of b.txt
   1 files changed, 1 insertions(+), 0 deletions(-)
   create mode 100644 src/b.txt
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (master)
  $ git merge XBranch
  CONFLICT (rename/delete): Rename src/a.txt-&gt;src/b.txt in XBranch and deleted in HEAD
  Automatic merge failed; fix conflicts and then commit the result.
  
  sabya@SABYA-PC d:/merge_temp/test/case2 (master|MERGING)
  $ cat src/b.txt
  Old Content
  </code></pre>