title: git stash restores ignored files
body: <p>I committed in the past some wrong files to git. After that I excluded and ignored these files:</p>
  
  <pre><code>git rm --cached -r config.php
  git reset config.php
  echo "config.php" &gt;&gt; .gitignore
  git update-index --assume-unchanged config.php
  </code></pre>
  
  <p>Now git commit works great. Changes in config.php are not committed.</p>
  
  <p>But: If I stash the working directory for example to switch the branch, than config.php is restored from the local repos.</p>
  
  <p>How can I use <code>git stash</code> without changing ignored (and from index excluded) files?</p>