I’ve accidentally executed the following command:
git rm -r .
Not surprisingly, it removed everything. Is there any way to revert it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try:
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:
To restore all the deleted files in a folder enter the following command.
to check what got deleted try: