title: Why does git stash pop say that it could not restore untracked files from stash entry?
body: <p>I had a bunch of staged and unstaged changes and I wanted to quickly switch to another branch and then switch back.</p>
  
  <p>So I staged my changes using:</p>
  
  <pre><code>$ git stash push -a
  </code></pre>
  
  <p>(In hindsight I probably could have used <code>--include-untracked</code> instead of <code>--all</code>)</p>
  
  <p>Then when I went to pop the stash I get a whole lot of errors along the lines of:</p>
  
  <pre><code>$ git stash pop
  foo.txt already exists, no checkout
  bar.txt already exists, no checkout
  ...
  Could not restore untracked files from stash entry
  </code></pre>
  
  <p>There doesn't seem to be any changes restored from the stash.</p>
  
  <p>I also tried <code>$ git stash branch temp</code> but that shows the same errors.</p>
  
  <p>I did figure out a way around this which was to use:</p>
  
  <pre><code>$ git stash show -p | git apply
  </code></pre>
  
  <p>Disaster averted for now but this raises some questions.</p>
  
  <p>Why did this error happen in the first place and how do I avoid it next time?</p>