git how to revert to specific revision
-
13-09-2020 - |
Question
I have a git project. I just made a commit, then I deleted some directories. ops, my bad. Now I want to restore those directories that I have deleted. how do I do that?
Solution
One way is to use git reset
:
git reset --hard HEAD
This command will discard any working copy changes you have made since the last commit.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow