title: Git push doesn't ignore files in .gitignore
body: <p>I committed some files that I shouldn't commit.
  Then I added these files in .gitignore and I did this:</p>
  
  <pre><code>git rm -r --cached somefile
  </code></pre>
  
  <p>and I committed again.</p>
  
  <p><code>git status</code> shows: </p>
  
  <p><code># On branch experiment<br>
  nothing to commit, working directory clean</code></p>
  
  <p>I do <code>git ls-files</code> and these files are not listed.</p>
  
  <p>But when I do <code>git push origin somebranch</code>, these files are still being pushed (they're too large to push to github so it fails).</p>
  
  <p>why is this? what should I do?</p>