git log.....input q can quit this statusgit add .git commit -m"change1"git commit --amend come to vim editcan press a ,i or o to edit//if you want to save and quit can press ESC and input :wq //if you want to quit but not save this edit can press ESC and input :q!to cancel add . and commit by use follow codegit reset --soft HEAD^ only cancel commit git status can show add file git reset --mixed HEAD^ cancel commit and add ,but code you have change is reserve***!!git reset --hard HEAD^ cancel commit and add ,attention,code you have change also cancel so is come to last time you commit.git reset --hard HEAD~3 Fall back to before the last three commuitsgit push origin HEAD --force force to origin brnach