Git how to get back to a specific revision

I have a git project. I just made a commit, then I deleted some directories. ops, my bad. Now I want to restore the directories that I deleted. how to do it?

+3
source share
1 answer

One way is to use git reset:

git reset --hard HEAD

This command will undo any changes to the working copy made since the last commit.

+6
source

Source: https://habr.com/ru/post/1754132/


All Articles