Answer the question
In order to leave comments, you need to log in
How to undo git reset --hard ???
Hello! Urgently need help.
It was necessary to remove the commit, but leave the directory and files intact. Made according to this article https://githowto.com/ru/removing_commits_from_a_branch
As a result, I lost all the files, the whole project...
How to return the commit and files?
Help, and then re-write it all PPC. This file is not in the repository.
Answer the question
In order to leave comments, you need to log in
It seems that I found a solution, the git reset --hard [email protected]{1} command helped
Yes, git reset --hard [email protected]{1} will roll back the last action. If you want to commits, you can also use:
git reset --hard HEAD~1
If it's about time, then you can:
git reset --hard [email protected]{"10 minutes ago"}
or
git reset --hard [email protected]{14 :thirty}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question