Skip to content

Home

Delete detached branches

Deletes all detached branches.

git fetch --all --prune

# Examples
git checkout master
git branch
# master
# patch-1
# patch-2

# Assuming `patch-1` is detached
git fetch --all --prune

git branch
# master
# patch-2

More like this

Start typing a keyphrase to see matching snippets.