How to change git commit message after push?
git commit --amend
然後在 force push 到 remote server:git push --force <repository> <branch>
如果同時也有人在修改該 branch 時,最好是用 --force-with-lease 比較安全,因為如果 upstream 已經有更改時,push 會被 abort:git push --force-with-lease <repository> <branch>
Ref: http://stackoverflow.com/questions/8981194/changing-git-commit-message-after-push-given-that-no-one-pulled-from-remote
沒有留言:
張貼留言