Skip to content

Instantly share code, notes, and snippets.

@joemaffei
Last active May 10, 2022 20:27
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 joemaffei/fd416ca6c679fe6263c90525d3f1dd1e to your computer and use it in GitHub Desktop.
Save joemaffei/fd416ca6c679fe6263c90525d3f1dd1e to your computer and use it in GitHub Desktop.
Delete branches merged to dev (bash)
# 1. get list of branches merged to dev, filter out dev and master
# 2. delete each branch
git branch --merged dev --list "[\!dev|master]*" | xargs -n 1 git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment