Learn
How to Backtrack
git reset review

To better understand git reset commit_SHA, notice the diagram on the right. Each circle represents a commit.

Before reset:

  • HEAD is at the most recent commit

After resetting:

  • HEAD goes to a previously made commit of your choice
  • The gray commits are no longer part of your project
  • You have in essence rewound the project’s history
Folder Icon

Sign up to start coding

Already have an account?