Git Reset allows you to undo changes made after a commit or between commits.
Undo changes after last commit
git reset --hard HEAD
Afterwards your project will have the state of the last commit. Perfect for doing experiments.
Undo last commit with a new commit
git revert HEAD
You will be able to remove the last edit and create a new fixed one instead. Useful, if you forgot a proper commit message or some files or just a typo.