Skip to content

Instantly share code, notes, and snippets.

@tanshuai
Last active October 23, 2021 08:46
Show Gist options
  • Save tanshuai/c94774a611b309ce4b20573ac13161f6 to your computer and use it in GitHub Desktop.
Save tanshuai/c94774a611b309ce4b20573ac13161f6 to your computer and use it in GitHub Desktop.
Delete all the local branches but keep main
git branch | grep -v "main" | xargs git branch -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment