Editing the git commit message in GitHub

后端 未结 7 828
臣服心动
臣服心动 2020-12-07 09:25

Is there any way of online editing the commit message in GitHub.com, after submission?

From the command line, one can do

git commit --am         


        
7条回答
  •  情话喂你
    2020-12-07 09:51

    No, this is not directly possible. The hash for every Git commit is also calculated based on the commit message. When you change the commit message, you change the commit hash. If you want to push that commit, you have to force that push (git push -f). But if already someone pulled your old commit and started a work based on that commit, he would have to rebase his work onto your new commit.

提交回复
热议问题