title: Not Possible to switch branch after --skip-worktree
body: <h2>WHAT I WANT TO DO</h2>
  <p>I have a file which contains sensitive datas so I don't want to push content of this file to remote server.</p>
  <h2>WHAT I DID?</h2>
  <p>To achieve this, I made a commit when the file was empty and pushed this empty file to server (GitHub). And then fill the file with sensitive datas and applied <code>git update-index --skip-worktree path/to/file</code> . But I didn't made any commit.</p>
  <p>Now  I'm trying to switch my branch but I'm getting this error :</p>
  <pre><code>    error: Your local changes to the following files would be overwritten by checkout:
      path/to/file
      Please, commit your changes or stash them before you can switch branches.
      Aborting
  </code></pre>
  <h2>WHY I USE <code>skip-worktree</code> INSTEAD OF <code>assume-unchanged</code>?</h2>
  <p>I read a few SO questions about this subject, and found <a href="https://stackoverflow.com/questions/13630849/git-difference-between-assume-unchanged-and-skip-worktree/13631525#13631525">Borealid's answer</a>.</p>
  <blockquote>
  <p>--assume-unchanged assumes that a developer shouldn’t change a file. This flag is meant for improving performance for not-changing folders like SDKs.</p>
  <p>--skip-worktree is useful when you instruct git not to touch a specific file ever because developers should change it. For example, if the main repository upstream hosts some production-ready configuration files and you don’t want to accidentally commit changes to those files, --skip-worktree is exactly what you want.</p>
  </blockquote>
  <p>After this, I found <a href="https://stackoverflow.com/questions/9815416/preserve-git-assume-unchanged-files-between-branch-checkouts">Jeff's question</a> and <a href="https://stackoverflow.com/a/9816844/556169">VonC's answer</a>. Jeff's problem is almost same with mine, and I followed VonC's solution. However it's not work for me. Maybe because of git version difference. Because that question from 2012. We talked with VonC and he said to ask this as a new question because he couldn't remember answer.</p>
  <p>I tried to use <code>--assume-unchanged</code> and <code>--skip-worktree</code>  together, and soft reseting worktree. But nothing changed.</p>
  <h2>SO?</h2>
  <p>Can you help me about my problem ?</p>
  <p>Thank you.</p>