Skip to content

Instantly share code, notes, and snippets.

@LolWalid
Created June 23, 2017 11:30
Show Gist options
  • Save LolWalid/4b1efd5cd9540c8d3203ffbd726554d6 to your computer and use it in GitHub Desktop.
Save LolWalid/4b1efd5cd9540c8d3203ffbd726554d6 to your computer and use it in GitHub Desktop.
Remove merged branch locally

Remove branch that are no longer being referenced

git remote prune origin

Remove merged branch

git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment