1. git-trim(1)
  2. git-trim(1)

NAME

git-trim - Trim git tracking branches

SYNOPSIS

git-trim

git-trim --delete all --dry-run

DESCRIPTION

git-trim automatically trims your tracking branches whose upstream branches are merged or gone.

FLAGS

--dry-run

Do not delete branches, show what branches will be deleted.

-h, --help

Prints help information.

--no-confirm

Do not ask confirm. [config: trim.confirm]

--no-detach

Do not detach when HEAD is about to be deleted. [config: trim.detach]

--no-update

Not update remotes. [config: trim.update]

-V, --version

Prints version information

OPTIONS

-b, --bases <bases>...

Comma separated or multiple arguments of refs that other refs are compared to determine whether it is merged or gone. [default: master][config: trim.base]

-d, --delete <delete>

Comma separated values of '<filter unit>[:<remote name>]'. Filter unit is one of the 'all, merged, gone, local, remote, merged-local, merged-remote, gone-local, gone-remote'.

You can scope a filter unit to specific remote ':<remote name>' to a 'filter unit' if the filter unit implies 'merged-remote' or 'gone-remote'. If there are filter units that are scoped, it trims merged or gone remote branches in the specified remote branch. If there are any filter unit that isn't scoped, it trims all merged or gone remote branches. [default : 'merged:origin'] [config: trim.filter]

-p, --protected <protected>...

Comma separated or multiple arguments of glob pattern of branches that never be deleted

  1. March 2020
  2. git-trim(1)