---
name: "git-delete-squashed-branches"
section: "1"
platform: "linux"
package: "git-extras"
version: "7.3.0-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/git-delete-squashed-branches"
---

# git-delete-squashed-branches(1)

Delete branches that were squashed

## NAME

**git-delete-squashed-branches** - Delete branches that were squashed

## SYNOPSIS

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

## DESCRIPTION

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
  ```

-

  ## AUTHOR

Written by Teddy Katz \<*teddy.katz@gmail.com*\> and Vladimir Jimenez \<*me@allejo.io*\>

## REPORTING BUGS

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

## SEE ALSO

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