Submitting the form below will ensure a prompt response from us.
Azure DevOps allows you to manage pull requests effectively, but it doesn’t provide a direct “delete” option for pull requests. Instead, there are three primary ways to handle this:
If you want to delete the branch associated with the pull request, follow these steps:
To delete the branch remotely, use this Git command:
bash
git push origin --delete
To remove the branch from your local repository, use:
bash
git branch -d
Azure DevOps provides a REST API to automate pull request management. Here’s a simple example to delete a pull request:
bash
DELETE https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}?api-version=6.0
Submitting the form below will ensure a prompt response from us.