Skip to content

Instantly share code, notes, and snippets.

@dinhkhanh
Created December 20, 2016 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dinhkhanh/dc9e78e854a684b9baa92a0a01db84e5 to your computer and use it in GitHub Desktop.
Save dinhkhanh/dc9e78e854a684b9baa92a0a01db84e5 to your computer and use it in GitHub Desktop.
Git remove merged branches
git branch -a --merged remotes/origin/master | grep -v master | grep "remotes/origin/" | cut -d "/" -f 3 | xargs -n 1 git push --delete origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment