title: Why does this git rebase think there's nothing to do?
body: <p>In this example, git doesn't think it needs to rebase, but it clearly does.</p>
  
  <p>Here's a quick script to create a mini test git repository</p>
  
  <pre><code>#!/bin/bash
  rm -rf testgit
  mkdir testgit
  cd testgit
  git init
  echo -e "a\nb\nc" &gt; file
  git add file
  git commit -am 'first'
  
  git checkout -b lineA
  echo -e "A\nb\nc" &gt; file
  git commit -am 'A'
  
  git checkout -b lineB
  echo -e "a\nB\nc" &gt; file
  git commit -am 'B'
  
  git checkout -b lineC
  echo -e "a\nb\nC" &gt; file
  git commit -am 'C'
  </code></pre>
  
  <p>After this runs, here's what <code>file</code> looks like in each branch</p>
  
  <pre><code>master | lineA | lineB | lineC
  ------------------------------
  
  a        A       a       a
  b        b       B       b
  c        c       c       C
  </code></pre>
  
  <p>Now let's merge all the branches into master, after which each letter in <code>file</code> should be capitalised</p>
  
  <pre><code>$ git checkout master
  $ git merge lineA
  </code></pre>
  
  <p>Okay.</p>
  
  <pre><code>$ git checkout lineB
  $ git rebase master
  Current branch lineB is up to date.
  </code></pre>
  
  <p>What? No, master changed.</p>
  
  <pre><code>$ git checkout master
  $ cat file
  A
  b
  c
  
  $ git checkout lineB
  $ cat file
  a
  B
  c
  </code></pre>
  
  <p>It seems to me that branch lineB needs to rebase to incorporate the change to master made by merging lineA.</p>
  
  <p><strong>Why doesn't git think this needs to be done?</strong></p>
  
  <p>Additionally, if you do this</p>
  
  <pre><code>$ git checkout master
  $ git merge lineA
  Already up-to-date.
  $ git merge lineB
  ...
   1 file changed, 2 insertions(+), 2 deletions(-)
  $ cat file
  a
  B
  c
  $ git merge lineC
  ...
   1 file changed, 2 insertions(+), 2 deletions(-)
  $ cat file
  a
  b
  C
  </code></pre>
  
  <p>Here the merges should conflict, but git is quietly clobbering them. I'm don't know if this is relevant, but it seems weird.</p>