How to change default message of a merging commit on Bitbucket

bitbucket

Is there any way to change the default commit message for pull requests merged via Bitbucket? When I click "Merge" button on top of a pull request page, the resulting commit has a default message like

Merged in some-branch (pull request #25)

The problem is the fragment #25 because I often push the same repository also to GitHub which links the number to the issue no. 25. I know that there is a text area where I can edit the message before each merge but it's really hard to remember.

Best Answer

Instead of the hazardous git rebase -i as proposed by @Stunner, you can just do a local merge with customized message.

git fetch origin refs/pull-requests/123/from
git merge FETCH_HEAD
(git push origin)

Options you can use with git-merge are -e, -m and --no-ff, depending on your desired style.