删除commit以及commit记录: git reset --hard HEAD~1 与revert不同,reset --hard后git log无法看到该提交。 而revert回保留所有修改的踪迹。