gitignore remove tracked files code example Example: git remove tracked files without deleting git rm --cached -r mydirectory