git復原最後一次的commit 從 [1] 的回答: # 重設上次修改 $ git reset HEAD~ # 編輯並再次git add修改,完成後: $ git commit -c ORIG_HEAD References: [1]git reset commit git - How do you undo the last commit? - Stack Overflow