當次提交
當次的提交顯示指定提交者信息:
1 git commit -m "Initial commit" --author="mn <mn@furzoom.com>"
修改上次提交
修改已經提交的commit的信息:
1 git commit --amend --author="mn <mn@furzoom.com>"
修改歷史提交
如果是上幾次的提交呢?可以利用rebase來實現,如:
1 git rebase -i orgin/master
在列表中將開頭的pick修改為edit,然后重復執行以下命令直到完成:
1 git commit --amend --author="mn <mn@furzoom.com>" 2 git rebase --continue
修改所有的提交
與上面的不同在於,不能再使用特定的commit id,使用
1 git rebase -i --root
即可。