Site icon Bytefreaks.net

Git: Delete all local branches

Advertisements

The following command will:

git branch --merged master | grep -v -e "\*" -e "master" | xargs git branch -D

Tip:

To cleanup any remote-tracking references that no longer exist on the remote use the following:

git fetch --prune

This post is also available in: Αγγλικα

Exit mobile version