title: `git show` not working: "fatal: Path [mypath] exists on disk, but not in [mybranch]"
body: <h2>Problem</h2>
  
  <p>I'm trying to view the contents of a file located in a branch named <code>wip</code> like so:</p>
  
  <pre><code>git show wip:local-config.php
  </code></pre>
  
  <p>However, I'm receiving the following error:</p>
  
  <pre><code>fatal: Path 'local-config.php' exists on disk, but not in 'wip'.
  </code></pre>
  
  <h2>What I tried</h2>
  
  <p>I tried correcting the path but it failed:</p>
  
  <pre><code>git show wip:./local-config.php
  </code></pre>
  
  <p>Rather than using another branch, I tried to reference a previous commit from the same branch like so:</p>
  
  <pre><code>git show cd14704:local-config.php
  </code></pre>
  
  <p>That gave this error:</p>
  
  <pre><code>fatal: Path 'local-config.php' exists on disk, but not in 'cd14704'.
  </code></pre>
  
  <p>Finally when I try to show the current <code>local-config.php</code> I get no output at all:</p>
  
  <pre><code>git show local-config.php
  </code></pre>
  
  <h2>The docs</h2>
  
  <p>According to the manual this is possible: <a href="https://www.kernel.org/pub/software/scm/git/docs/git-show.html" rel="noreferrer">https://www.kernel.org/pub/software/scm/git/docs/git-show.html</a>. What am I doing wrong?</p>