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?

Was it helpful?

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
scroll top