问题
When pull requests are created, their commit message is always like "Merged PR### from {branch name} into {target branch name}"
I keep amending commit messages and this is a bit tiring. I rely on the commit messages to keep track, so the automatic messages present a problem.
回答1:
This is a feature of Azure DevOps, the purpose is making it clearly to describe what happened for each commit.
For the commit message with a merged commit by pull request, the default commit message is defined by the git server side (such as Azure DevOps, github etc) where your git repo hosted.
And it's a good habit to add the pull request information in commit message since the commit is merged by PR.
As you found, the default merge commit message in VSTS pull request like Merged PR <pull request ID>: branch1 to branch2
.
Additional, such as GitHub, the default merge for pull request like Merge pull request #<pull request ID> from account/branch
.
If you want to use your own commit message for merging Azure DevOps pull request, just custom the commit message as you need in the text box before clicking Complete merge button (such as change the default message Merged PR 118: master to b1
in text box in below example).
来源:https://stackoverflow.com/questions/55636169/how-to-change-pr-merge-commit-message