Skip to content

Instantly share code, notes, and snippets.

@nsisodiya
Created December 17, 2020 10:48
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 nsisodiya/1e984c113fc583c627b46e63f7a409a4 to your computer and use it in GitHub Desktop.
Save nsisodiya/1e984c113fc583c627b46e63f7a409a4 to your computer and use it in GitHub Desktop.
Delete all remote git branch which are matching a given name
git branch -r | cat | grep sandesh | while read i
do
git push origin --delete $(echo $i | sed 's/\origin\///g')
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment