6

I recently merged a branch into master and want to delete it now that I'm done with it. But github tells me that I can't delete it because some open pull request depends on it. How do I find out which pull requests depend on this branch?

2
  • Can you link the repository please?
    – Nacev
    Nov 18, 2017 at 9:16
  • Unfortunately, I can't. It's github enterprise...
    – wheeeee
    Nov 20, 2017 at 18:39

2 Answers 2

7
+50

To find the open pull requests which depend on a particular branch called foo (i.e. pull requests for merging other branches into branch foo), use the following Filter query in the Pull requests tab:

is:pr base:foo is:open

This will identify the Pull Requests preventing the deletion of branch foo

GitHub Pull requests tab

0

I found that one of my open pull requests was trying to merge into the branch I was trying to delete, instead of merging into master as it was supposed to. Fixing this allowed me to delete my branch.

I could not find a way to easily view all the open pull requests involving any given branch, so I had to go through my open PRs one by one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.