Skip to content

Instantly share code, notes, and snippets.

@romfrolov
Last active April 30, 2021 23:21
Show Gist options
  • Save romfrolov/5febbc52718366e0224c471322efd51f to your computer and use it in GitHub Desktop.
Save romfrolov/5febbc52718366e0224c471322efd51f to your computer and use it in GitHub Desktop.
Delete all merged branches
# Delete all local branches that have been merged.
function delete_merged_branches() {
git branch --merged | egrep -v "(^\*|master)" | xargs git branch -d
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment