1. git rm -r --cached .  
  2. git add .  
  3. git commit -m 'update .gitignore'