Skip to content

Instantly share code, notes, and snippets.

@ittus
Created May 28, 2020 07:57
Show Gist options
  • Save ittus/5e393a3bbc6a0a8a0413fd0754f1c8fb to your computer and use it in GitHub Desktop.
Save ittus/5e393a3bbc6a0a8a0413fd0754f1c8fb to your computer and use it in GitHub Desktop.
Delete all git branch with search text

Delete all brances with fix/ in branch name

git branch | grep "fix/" | xargs git branch -D

Delete all branches except branch with fix/ in branch name

git branch | grep -v "fix/" | xargs git branch -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment