title: Git still adds and tracks folders marked in .gitignore
body: <p>I have a few folders in Git added in my ".gitignore" file. They contain over 100k files. Mainly images, tmp and cache stuff. What I need is to be able to commit changes to my code with out committing what happens in those folders. </p>
  
  <p>I thought adding them into the ".gitignore" would do the trick but for some reason it's not working at all. I haven't been able to commit anything to the repo in days because every time I try the push command it tries sending 100k files then it freezes and times out.</p>
  
  <pre><code>root@serveur [/home/***/***]# git push origin master
  Password:
  Counting objects: 110300, done.
  </code></pre>
  
  <p>How can I force Git to reindex the tree while taking in consideration the ignored folders so I can finally commit all the changes I made to the code?</p>