Git merge & adding change id
What is the proper way to add change id to a merge commit subsequently?
I merged some changes from master branches, that caused a merged commit that doesn’t contain change id. This is not the last commit, so commit –amend doesn’t work.
I’ve tried to use interactive rebase, but I can’t find the merge commits among the other commits to rewrite commit message.
How can I solve this? There’s a metrhod to avoid these situations?
One Solution collect form web for “Git merge & adding change id”
you can use
git rebase -i --preserve-merges
git checkout -b temp SHA1-of-merge git commit --amend # this is where you change your message git rebase --onto temp SHA1-of-merge my-branch
Just remember that you will need to force push your branch after this and may need to tell anyone that is working on the repo currently.