修改提交信息 git commit --amend

#提交之后未做任何修改,修改提交信息
git commit -m 第一次
git commit --amend -m 重来第一次
#提交后发现有漏掉提交的文件
$ git commit -m 'initial commit'
$ git add forgotten_file
$ git commit --amend

第二次提交会替代第一次提交的结果

results matching ""

    No results matching ""