REF.: Git - git-reset Documentation
REF.: Git - git-commit Documentation
Note: Undo
is NOT a git command! It is just referring to help undoing things while using git
.
git reset --soft HEAD^
git reset --soft <hash>
Note: HEAD^
goes 1 step back, HEAD^^/HEAD~2
goes 2 steps back, etc.
git reset --hard HEAD^
git commit --amend