git gitignore tracked files code example
Example 1: gitignore already tracked files
# to ignore all files with changes detected
git rm -r --cached .
git add .
git commit -am "Remove ignored files"
Example 2: gitignore files that are already tracked
git rm --cached <file> // Stop tracking file
git rm -r --cached <folder> // Stop tracking folder