简体   繁体   English

通过VS团队服务从特定提交创建拉取请求

[英]Create pull request from specific commit via VS team services

I am trying to create a pull request from specific commit. 我正在尝试从特定提交创建拉取请求。 Is it possible? 可能吗?

Detail: 详情:

There is commit c1, c2, c3 in branch b1, and commit c3 is also in branch b2. 在分支b1中存在提交c1,c2,c3,并且提交c3也在分支b2中。 Create a pull request to merge commit c2 into branch b2. 创建拉动请求以将提交c2合并到分支b2中。

My failed attempts: 我失败的尝试:

  • Create a new branch from specific commit, couldn't find any VS team services API for this. 从特定提交创建新分支,找不到任何VS团队服务API。
  • Create a tag on specific commit, don't know how to, only found get tag api . 在特定的提交上创建一个标签,不知道如何,只找到get标签api
  • Build a temporary branch b3 from b2, cherry-pick commit c2 to b3 and create pull request from b3 to b2. 从b2,cherry-pick commit c2到b3构建一个临时分支b3,并创建从b3到b2的pull请求。 I don't see any way to pick a existing commit to a branch from official document. 我没有看到任何方法从官方文档中选择现有的分支提交。

Since the REST Api doesn't have any features to perform merges nor conflict resolution, anything that has to do with merges, rebases, cherry-picks etc needs to be performed locally before pushing the commit data back to VSTS. 由于REST Api没有任何功能来执行合并或冲突解决,因此在将提交数据推回到VSTS之前,需要在本地执行与合并,rebase,cherry-picks等有关的任何事情。

The simplest solution would be to perform a clone of the target repo and then to perform the changes before pushing them back. 最简单的解决方案是执行目标仓库的克隆,然后在推回之前执行更改。

Depending on what you're trying to accomplish, a shallow clone may suffice, though if you want to cherry pick old commits, that may not work for you. 根据您要完成的任务,浅层克隆可能就足够了,但如果您想挑选旧的提交,那可能对您不起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM