Home > Blockchain >  How to rename merge commit message?
How to rename merge commit message?

Time:09-13

I did git merge master twice, apparently this company prefer rebase instead of merge.

merge commits

those 2 merge commit (deedb27e, 65b4d3fcc) need to be renamed or it would rejected by the upstream (the have checks that would reject any commit without proper format).

I've tried right clicking those two merge commits on IntelliJ, it have "Edit commit message" disabled.

enter image description here

Also tried git rebase -p but it shows fatal: --preserve-merges was replaced by --rebase-merges, so I tried that, it shows a progress, but the history still the same

git rebase --rebase-merges                                                                                                                                                                                            Successfully rebased and updated refs/heads/rm-v1.

How can I rewrite the local history so it doesn't have those "Merge branch 'master' into rm-v1?

CodePudding user response:

How to rename merge commit message?

You can still do a rebase interactive and rename your commits enter image description here

But I suggest to create a clean new branch from master, cherry pick your relevant commits in the branch rm-v1 and resolving conflicts if needed. then you can have a beautiful MR without merge commit.

  • Related