git-delete-squashed-branches(1)

git-delete-squashed-branches1

Delete branches that were squashed

Usage

git-delete-squashed-branches [--proceed, -p] [<branch-name>]

Overview

Deletes all git branches that have been "squash-merged" into branch-name.

Options

--proceed, -p

Proceed with the next branch even if the current branch cannot be deleted (e.g. because it is checked out in a worktree)

<branch-name>

The target branch were the "squashed-merged" branches were committed to. If no value is given, then the current checked out branch will be used.

Examples

Delete all branches that were "squash-merged" into the current checked out branch.

$ git delete-squashed-branches

Delete all branches that were "squash-merged" into the main branch. This will checkout the target branch and leave you on said branch after the command has completed.

$ git delete-squashed-branches main

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

Author

Written by Teddy Katz <[email protected]> and Vladimir Jimenez <[email protected]>

Reporting bugs

<https://github.com/tj/git-extras/issues>

From git-extras 7.3.0-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.