git for-each-ref --format '%(refname:short)' refs/heads | grep -v main | xargs git branch -D
Created
May 3, 2021 15:34
-
-
Save nelsonprsousa/5ca4d357ed31e838a21c49cfaddf0f8a to your computer and use it in GitHub Desktop.
Delete all local branches but main
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment