如何更改PR合并提交消息? [英] How to change PR merge commit message?

查看:71
本文介绍了如何更改PR合并提交消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

创建拉取请求时,其提交消息始终类似于将PR ###从{分支名称}合并到{目标分支名称}中"

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.

推荐答案

这是Azure DevOps的一项功能,目的是清楚地描述每次提交所发生的情况.

This is a feature of Azure DevOps, the purpose is making it clearly to describe what happened for each commit.

对于具有通过pull request合并提交的提交消息,默认提交消息由git存储库所在的git服务器端(例如Azure DevOps,github等)定义.

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.

并且在提交消息中添加拉取请求信息是一个好习惯,因为提交是由PR合并的.

And it's a good habit to add the pull request information in commit message since the commit is merged by PR.

如您所见,VSTS提取请求中的默认合并提交消息,例如 Merged PR< pull request ID> ;:从branch1到branch2 .

As you found, the default merge commit message in VSTS pull request like Merged PR <pull request ID>: branch1 to branch2.

其他(例如GitHub)是请求请求的默认合并,例如 Merge pull request#< pull request ID>来自帐户/分支机构.

Additional, such as GitHub, the default merge for pull request like Merge pull request #<pull request ID> from account/branch.

如果要使用自己的提交消息合并Azure DevOps拉取请求,只需在文本框中根据需要自定义提交消息,然后单击完成合并"按钮(例如,在以下示例的文本框中,将默认消息"<合并> PR 118:master更改为b1 ").

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).

这篇关于如何更改PR合并提交消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆