Skip to content

Instantly share code, notes, and snippets.

@kostandy
Created October 7, 2019 09:14
Show Gist options
  • Save kostandy/9b06b4ececa90a18b89279782529a0bd to your computer and use it in GitHub Desktop.
Save kostandy/9b06b4ececa90a18b89279782529a0bd to your computer and use it in GitHub Desktop.
Remove checkout branches which were merged to master from remote origin (be careful!)
git branch -r --merged | grep -v master | 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