Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Close a pull request without merging it into the upstream branch in Azure DevOps

Is it possible to close a pull request without merging it into the upstream branch?

I am using gitflow and so I want the developer who started the feature branch to finish the feature branch rather than reviewer to merge the feature branch.

Looks like this facility is available in github.

like image 964
VivekDev Avatar asked Jan 23 '20 03:01

VivekDev


People also ask

How do I close a pull request without merging?

In the "Pull Requests" list, click the pull request you'd like to close. At the bottom of the pull request, below the comment box, click Close pull request. Optionally, delete the branch. This keeps the list of branches in your repository tidy.

How do I close a pull request in Azure DevOps?

In the Pull Requests view in Visual Studio Team Explorer, right-click the PR and select Open in browser to open a PR in the web portal. On the Overview page, select Abandon.

Does Close pull request merge?

In the pull request, choose Close pull request. This option closes the pull request without attempting to merge the source branch into the destination branch. This option does not provide a way to delete the source branch as part of closing the pull request, but you can do it yourself after the request is closed.

What happens when you abandon a pull request?

Abandon or reactivate a pull requestYou can still view the abandoned PR, and it stays linked to work items. To reactivate an abandoned PR at any time, open the PR from the Abandoned tab in the Pull Request view, and select Reactivate at upper right.


2 Answers

You can abandon the Pull Request, it will close it without merging:

enter image description here

like image 181
Shayki Abramczyk Avatar answered Oct 22 '22 20:10

Shayki Abramczyk


Ok, So if you want to merge but not delete the feature branch, there is an option. Just uncheck the delete check box.

Now using gitflow, you can now finish the branch. Then git flow will delete the branch locally as well as remotely. And before deleting locally, it will merge changes from the feature branch to the develop locally.

enter image description here

like image 21
VivekDev Avatar answered Oct 22 '22 20:10

VivekDev