How to revert a “git rm -r .”?
Should do it. If you don’t have any uncommitted changes that you care about, then should forcibly reset everything to your last commit. If you do have uncommitted changes, but the first command doesn’t work, then save your uncommitted changes with git stash: