Git Reset
git reset moves the current branch, and HEAD, to another commit. The commits after it are no longer on the branch.
--soft keeps the changes staged, --mixed (the default) keeps them in your files but unstaged, and --hard throws them away.
Undo the last commit, keep the changes
git reset --soft HEAD~1
git status --short
M index.html
git log --oneline -2
bf9f310 Add a thank you line
5091107 Add blue style
Throw away the last commit
Be careful: --hard also deletes uncommitted changes in your files.
git reset --hard HEAD~1
HEAD is now at 5091107 Add blue style