Untrack files added to .gitignore

February 27, 2019 - Last updated: November 7, 2019

Remove a particular file

git rm --cached paper.txt
git add paper.txt
git commit -m "remove file paper.txt"
git push

Remove all files

git rm --cached -r .
git add .
git commit -m "remove all files from .gitignore"
git push