开发者

How to edit the commit message of a git merge [duplicate]

开发者 https://www.devze.com 2023-04-09 14:45 出处:网络
This question already has answers here: Git: How to edit/reword a merge commit's message? (8 answers)
This question already has answers here: Git: How to edit/reword a merge commit's message? (8 answers) Closed 9 years ago.

I have merged with other branch, and there are few c开发者_C百科ommits after merge, before pushing i want to change the message of the merge. git rebase -i is not displaying the merge commit.


Not sure if there is a more elegant version, but what you can do is the following:

git checkout <sha of merge>
git commit --amend # edit message
git rebase HEAD previous_branch
0

精彩评论

暂无评论...
验证码 换一张
取 消