This course will become read-only in the near future. Tell us at if that is a problem.


The reset command will clear any cached changes and place the repository to the state in which they were after the previous commit. Basically, any changes that would show up with the git diff command would be reverted to a previous state. The reset command is used with a branch name, such as HEAD, to specify in which state to place the files.

git reset --hard HEAD

The above command will place the repository back in sync with the previous state of HEAD.