"safe"? What it does is empty the index and commit the deletion of those files, without removing them from the working tree (your disk)
That means all those files become un-tracked (private).
Usually, you don't commit after such a command. You reset (as you did).
That can force content drivers (like a smudge script) or other .gitattributes
directives to be applied again on all files.
You can see that command used in the GitHub help page "Dealing with line endings".
git rm --cached -r .
# Remove everything from the index.
git reset --hard
# Write both the index and working directory from git's database.
Again, in this case: no commit, only a reset.