Files
git-mirror/Documentation
Harald Nordgren e6350140db branch: add --forked filter for --list mode
Add a --forked option to "git branch" list mode that lists only
branches whose configured upstream matches <branch>. The argument
can be a ref (e.g. "origin/main", "master"), a remote name like
"origin" for the branch its origin/HEAD points at, or a shell glob
(e.g. "origin/*"), and may be repeated to widen the filter.

It is an ordinary list filter, so it combines with the others:

    git branch --merged origin/main --forked 'origin/*'

lists branches forked from origin that are already merged into
origin/main, and --no-merged inverts the question.

This is the building block for --delete-merged, which deletes the
listed branches once they have landed on their upstream.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-18 13:33:07 -07:00
..
2025-03-01 10:26:15 -08:00
2026-04-13 13:54:57 -07:00
2025-12-14 17:04:37 +09:00
2026-03-06 13:02:20 -08:00
2025-10-02 12:26:12 -07:00
2025-02-14 17:53:47 -08:00
2025-12-05 14:49:56 +09:00
2025-12-16 09:42:44 +09:00