git push后修改错误的commit message
Easiest solution (but please read this whole answer before doing this):git rebase -i (这里可以用要改的那次的hash,如果是前一两次也可以用HEAD^或者HEAD^^)In the editor that opens, change pick to reword on the line for the i
文章共91字 · 阅读需要大约1分钟
一键AI生成摘要,助你高效阅读
问答
·
Easiest solution (but please read this whole answer before doing this):
git rebase -i <hash-of-commit-preceding-the-incorrect-one>(这里可以用要改的那次的hash,如果是前一两次也可以用HEAD^或者HEAD^^)
- In the editor that opens, change
pick
toreword
on the line for the incorrect commit. - Save the file and close the editor.
- The editor will open again with the incorrect commit message. Fix it.
- Save the file and close the editor.
git push --force
to update GitHub.
更多推荐
已为社区贡献1条内容
所有评论(0)