# Remember to commit everything you've changed before you do this!
git rm -rf --cached .
git add .
# This removes all files from the repository and adds them back
# (this time respecting the rules in your .gitignore).
# Source: https://stackoverflow.com/a/25436481