Task 11 - cannot reset

For task 11, I enter:

“git reset xxxxxx” (first 7 chars of SHA of last commit)

The output reads:

Unstaged changes after reset:
M fire-and-ice.txt
M oven-bird.txt
M road-not-taken.txt

but the text of files do not revert to what they were before. And the git log still has the last commit.

What am I doing wrong?

You could reset, you did, the output says so. But resetting the staging area doesn’t affect your working directory, to do that you would use checkout with --force to indicate that you want to discard your changes. To reset both the index and the working directory you can use reset with --hard

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.