如何从命令行创建 TFS 拉取请求
How to create a TFS pull request from command line
我知道如何创建 TFS 拉取请求 using the web interface。然而这样很不方便。我已经从命令行执行此操作
git checkout -b mybranch
git add <files>
git commit -m "my changes"
git push origin mybranch
所以我想输入其他内容,例如
create-pull-request mybranch
而不是转到浏览器并摆弄不同的用户界面。也许我可以用 curl 做点什么?
有 VSTS CLI interface that you can configure to use git aliases (see this article),包括创建拉取请求。
您可以使用 VSTS CLI 管理 VSTS/TFS 资源的新命令行体验。
创建拉取请求(示例)逗号nd
vsts pr create --title "My PR" --auto-complete
注意: VSTS CLI 在 Team Foundation Server 2017 更新 2 及更高版本上受支持。
在开始使用此命令之前,了解如何install the CLI here。
更多详情请参考本教程:Get started with the VSTS CLI
我知道如何创建 TFS 拉取请求 using the web interface。然而这样很不方便。我已经从命令行执行此操作
git checkout -b mybranch
git add <files>
git commit -m "my changes"
git push origin mybranch
所以我想输入其他内容,例如
create-pull-request mybranch
而不是转到浏览器并摆弄不同的用户界面。也许我可以用 curl 做点什么?
有 VSTS CLI interface that you can configure to use git aliases (see this article),包括创建拉取请求。
您可以使用 VSTS CLI 管理 VSTS/TFS 资源的新命令行体验。
创建拉取请求(示例)逗号nd
vsts pr create --title "My PR" --auto-complete
注意: VSTS CLI 在 Team Foundation Server 2017 更新 2 及更高版本上受支持。
在开始使用此命令之前,了解如何install the CLI here。
更多详情请参考本教程:Get started with the VSTS CLI