$ git rm $(git ls-files -d) is quite dangerous. You might accidentally delete other files if one of the files deleted in git contains whitespace in the file name.
Better:
$ git ls-files -d | while read f; do rm "$f"; done
That'll work better (still has issues with files containing new line characters but that's a lot less likely to happen).
$ git rm $(git ls-files -d)
is quite dangerous. You might accidentally delete other files if one of the files deleted in git contains whitespace in the file name.Better:
That'll work better (still has issues with files containing new line characters but that's a lot less likely to happen).