Skip to content

Instantly share code, notes, and snippets.

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 xthiago/b6080b16c944c8d2576794ea3990bec4 to your computer and use it in GitHub Desktop.
Save xthiago/b6080b16c944c8d2576794ea3990bec4 to your computer and use it in GitHub Desktop.
Delete already merged remote branches
git branch -r --merged | egrep -v '(master|main|release|development)' | sed 's/origin\///' | 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