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.

  • Alter message in Gerrit code review
  • Submit new/fixed code to an existing Gerrit branch after review
  • How is git merge better than svn merge if you still have to go through the same steps?
  • Jenkins gerrit trigger not fetching my change while building
  • how should the other remote site using gerrit server based on a mirror repo?
  • Can't find 'Label Verified' permission in gerrit 2.7
  • 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?



  • How to revert a file to a previous version without overwriting current changes?
  • how to get git to ignore a file (wild card files)
  • Moving incremental project folders to Git as commits
  • What user will Ansible run my commands as?
  • git merge -Xignore-space-change by default
  • recovering from git rebase
  • 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.

    Git Baby is a git and github fan, let's start git clone.