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.
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.
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.
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.
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.
You can abandon the Pull Request, it will close it without merging:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With