title: Why do the changes introduced by a commit not show up in my working tree?
body: <p>I'm having an issue where git says a commit is merged, but the
  changes from the commit aren't in my working tree. To make things even weirder,
  <code>git log --name-status 362dde7</code> tells me that the commit modified a file, but
  <code>git log -- path/to/modified/file.java</code> does not show the commit. For example:</p>
  
  <p>Ensure that the commit in question exists on both the dev branch and feature branch.</p>
  
  <pre><code>$ git branch --contains 362dde74f142831c99820b999558a2e8f49f66e8
  * dev
    feature
  </code></pre>
  
  <p>List the files modified by the commit.</p>
  
  <pre><code>$ git show --name-status 362dde74f142831c99820b999558a2e8f49f66e8
  # commit summary... #
  M       path/to/modified/file.java
  </code></pre>
  
  <p>Now when I do the reverse (list the commits that have modified the file) the commit isn't listed.</p>
  
  <pre><code>$ git log path/to/modified/file.java
  # Commit 362dde7 isn't listed here
  </code></pre>
  
  <p>If I switch to the feature branch and follow the same steps, everything works as expected.</p>
  
  <pre><code>$ git checkout feature
  $ git show --name-status 362dde74f142831c99820b999558a2e8f49f66e8
  # commit summary... #
  M       path/to/modified/file.java
  $ git log path/to/modified/file.java
  362dde7 Commit summary
  </code></pre>
  
  <p>Basically, the same commit exists on both <code>dev</code> and <code>feature</code>, but the working tree changes only show up when I have <code>feature</code> checked out. Does anyone have an idea as to why this is happening?</p>