Tidying up after Pull Requests
At GitHub, we love to use Pull Requests all day, every day. The only trouble is that we end up with a lot of defunct branches after Pull Requests have…
At GitHub, we love to use Pull Requests all day, every day. The only trouble is that we end up with a lot of defunct branches after Pull Requests have been merged or closed. From time to time, one of us would clear out these branches with a script, but we thought it would be better to take care of this step as part of our regular workflow on GitHub.com.
Starting today, after a Pull Request has been merged, you’ll see a button to delete the lingering branch:

If the Pull Request was closed without being merged, the button will look a little different to warn you about deleting unmerged commits:

Of course, you can only delete branches in repositories that you have push access to.
Enjoy your tidy repositories!
Written by
Related posts
GitHub availability report: June 2026
In June, we experienced six incidents that resulted in degraded performance across GitHub services.
Q1 2026 Innovation Graph update: Open source collaboration is accelerating worldwide
New Innovation Graph data shows global developer communities growing faster than ever, with collaboration reaching new highs across many economies.
GitHub joins coalition advocating for fixes to California AI Transparency Act to protect open source
We’re calling for targeted amendments to resolve conflicts with open source licensing and align with international transparency frameworks while preserving regulatory intent.