stop git from tracking file code example Example: stop tracking files git git rm -r --cached . && git add . && git commit -m "Remove ignored files"