git修改提交歷史中的author信息

當次提交

當次的提交顯示指定提交者信息:git

1 git commit -m "Initial commit" --author="mn <mn@furzoom.com>"

修改上次提交

修改已經提交的commit的信息:spa

1 git commit --amend --author="mn <mn@furzoom.com>"

修改歷史提交

若是是上幾回的提交呢?能夠利用rebase來實現,如:code

1 git rebase -i orgin/master

在列表中將開頭的pick修改成edit,而後重複執行如下命令直到完成:blog

1 git commit --amend --author="mn <mn@furzoom.com>"
2 git rebase --continue

修改全部的提交

與上面的不一樣在於,不能再使用特定的commit id,使用it

1 git rebase -i --root

便可。

ast

相關文章
相關標籤/搜索