Anne's Notes Website
git reset HEAD~1
PS. 如果想要回復成上 2 個,就做 2 次此指令
git reflog
PS. 紀錄包含 pull、commit、reset ...的所有操作紀錄
git reset --hard {commit id}
EX:要修改倒數第 3 個 commit 的訊息
git rebase -i HEAD~3