Skip to content

Instantly share code, notes, and snippets.

View aga5tya's full-sized avatar

Prithvi Raju M aga5tya

View GitHub Profile
@aga5tya
aga5tya / gist:b7ca66acfb1b4fd3290bacd95495bf74
Created April 23, 2018 15:35 — forked from leoapost/gist:4318441
Delete all remote branches, except master
# Replace REMOTE_NAME with your remote name (e.g. origin)
git branch -r | grep REMOTE_NAME/ | grep -v 'master$' | grep -v HEAD| cut -d/ -f2 | while read line; do git push REMOTE_NAME :$line; done;