If you’ve run only git rm -r --cached, try doing a git reset HEAD . from within your repo root.
If you did a git commit -m "msg" after doing a git rm -r --cached, i.e., you committed the changes, then do git reset HEAD~1 to undo your last commit.