Skip to content

Instantly share code, notes, and snippets.

@arumals
Last active May 16, 2024 21:17
Show Gist options
  • Save arumals/6b389eca8d0f3d1748cfb1afff3d6198 to your computer and use it in GitHub Desktop.
Save arumals/6b389eca8d0f3d1748cfb1afff3d6198 to your computer and use it in GitHub Desktop.
Alias to clean merged git branches from command line
clean_branches() {
git branch --merged | egrep -v "(^\*|master|main|dev)" | xargs git branch -d
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment