如何编辑git合并的提交信息 [英] How to edit the commit message of a git merge
本文介绍了如何编辑git合并的提交信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经与其他分支合并,合并后提交的提交很少,在推送之前我想更改合并的消息。 git rebase -i不显示合并提交。
I have merged with other branch, and there are few commits 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
这篇关于如何编辑git合并的提交信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文