.gitignore not working when files are already committed Commit everything (also .gitignore file) so nothing is left to commit Remove everything from the remote repo by: git rm -r --cached . Re-commit everything again by: git add . git commit -m ".gitignore fix"