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.

  • Repository Migration to Gerrit, git push --mirror returns refs/meta/config (cannot delete project configuration)
  • Viewing Unpublished Git Commits to Gerrit
  • Rejection when removing remote branch on git
  • Grep functionality with Git Log command
  • How to add a project to the gerrit code review tool?
  • GIT: merge two branches into a new one without dependencies in Gerrit
  • 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?

    Thanks,

    Hubi

  • Git revert resulted in conflicts. Now what?
  • How to reproduce tor build using gitian?
  • Github Client Sync Issue
  • How to undo git rm
  • No submodule mapping found in .gitmodules for path 'sinatra-bootstrap'
  • Fix git history with duplicate commits
  • One Solution collect form web for “Git merge & adding change id”

    you can use

    git rebase -i --preserve-merges
    

    or

    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.