git-delete-merged-branches

Remove all branches merged into current branch

TLDR

Remove local branches already merged into the current branch
$ git delete-merged-branches

SYNOPSIS

git delete-merged-branches

DESCRIPTION

git delete-merged-branches deletes all branches that have been merged into the current branch, automating post-merge cleanup. Part of the git-extras toolkit, it identifies branches whose changes are fully incorporated into the current branch and removes them in batch.The command uses Git's merge-base calculation to determine which branches are safe to delete, ensuring that only branches with no unique commits are removed. It is commonly run after release cycles or as part of repository maintenance routines to prevent branch sprawl.

INSTALL

brew install git-delete-merged-branches
nix profile install nixpkgs#git-delete-merged-branches

SEE ALSO

git-branch(1), git-extras(1)

RESOURCES

Source code