Resync Gitignore Remove all files git rm -r --cached . Add all files as per new .gitignore git add . Now, commit git commit -m ".gitignore is now working"