remove tracked files in git code example
Example 1: git remove tracked files without deleting
git rm --cached -r mydirectory
Example 2: remove tracked files git
git rm --cached <file>
git rm --cached -r mydirectory
git rm --cached <file>