Git重写提交记录

在 Git 中,我们要重写或者修改提交的历史记录,可以使用 amend 命令,如下:

git commit --amend touch "aaaa" >> master.txt git add master.txt git commit -m "confit rebase" git rebase master