Skip to content
When a PR is merged, the merged branch is automatically deleted.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Delete Merged Branches

This GitHook automatically deletes branches after they have been merged via a pull request.

Warning: the branch will get deleted no matter what it is merged into (this is the intended behaviour). Example - you have three branches:

  • master
  • featureA
  • featureB

You open a PR to merge featureB into featureA. When you press 'Merge', featureB will be deleted.

You then open a PR to merge featureA with master. When you press 'Merge', featureA will be deleted.

How to install

On the githook-delete-merged-branches page on, there's a big 'Install' button. Just choose the repo you want to install it to, then hit the button!

You can’t perform that action at this time.