How can I untrack files in Git according to my .gitignore file?
You can stop tracking already-tracked files by staging a deletion of the file in the index:
git rm --cached path/to/ignored/file
... and committing.
With --cached
this won't actually delete the file in your working copy. (I'm always paranoid and copy them somewhere safe first, anyway.)
You need to remove the files from the index.
git rm -r --cached .
and then add
git add .
Finally commit:
git commit -a -m "Untrack ignored files!"