如何在线恢复 Visual Studio 中的 git pull request? [英] How to revert git pull request in Visual Studio online?

查看:52
本文介绍了如何在线恢复 Visual Studio 中的 git pull request?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一名团队成员使用 git for Visual Studio Online 提出了拉取请求.它被批准并成功合并,但是我们想撤消它并恢复到 PR 之前的分支状态.

A team member made a pull request using git for visual studio online. It was approved and merged in successfully, however we would like to undo that and revert to the state of the branch prior to the PR.

在本地,我知道有一种方法可以做到这一点.这将是获取我们主分支的一个版本,恢复到分支中的早期版本,然后像标准 PR 一样提交它.但是,在线 VSTFS 中没有办法简单地撤消"吗?

Locally, I'm aware of a way to do this. It would be to get a version of our master branch, revert to the earlier version in a branch, and commit it like a standard PR. However, is there not a way in the VSTFS online to simply "undo"?

谢谢

更新

我很抱歉.我没有说明这是针对 TFS 2015 的,显然这在 2015 年不作为功能提供.

My apologies. I didn't clarify that this was for TFS 2015, and apparently that is not available as a feature in 2015.

推荐答案

可以直接在VSTS中还原完成的pull request:

You can revert the completed pull request directly in VSTS:

  1. 导航到完成的拉取请求:代码>>拉取请求>>已完成
  2. 选择并打开要还原的拉取请求.
  3. 点击更多操作(在Delete source Branch按钮后面)>>还原
  4. 在打开的还原拉取请求对话框中点击还原.
  5. 在恢复成功对话框中点击创建拉取请求.

  1. Navigate to the completed Pull Request : Code >> Pull Request >> Completed
  2. Select and open the Pull Request which you want to be reverted.
  3. Click More Actions (Behind the Delete source Branch button) >> Revert
  4. Click Revert on the opened Revert pull request dialog.
  5. Click Create Pull Request in the revert succeeded dialog.

Revert 成功创建新分支 Dev-revert-from-master.

点击创建 >> 批准 >> 完成 >> 启用合并后删除 Dev-revert-from-master 复选框 >>完成合并

Click Create >> Approve >> Complete >> Enable the checkbox for Delete Dev-revert-from-master after merging >> Complete merge

检查Master分支中的代码,应该回滚.

Check the code in Master branch, it should be reverted back.

这篇关于如何在线恢复 Visual Studio 中的 git pull request?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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