Skip to content

git-clean

Terminal window
git-clean [-f]

Fetches and prunes the remote, fast-forwards the current branch, then deletes local branches whose remote tracking branch has been deleted. Switches to main/master automatically if the current branch is orphaned.

-f/--force Force-delete unmerged branches too
Terminal window
git-clean
git-clean --force