MarioBinder
10/29/2018 - 8:44 AM

How to make Git “forget” about a file that was tracked but is now in .gitignore?

How to make Git “forget” about a file that was tracked but is now in .gitignore?

git rm -r --cached . 
git add .
git commit -am "Remove ignored files"

//via https://stackoverflow.com/a/19095988/119109