how to delete a file in git bash code example Example: git remove cached directory git rm -r --cached [directory]