Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kittinunf/2e85bb967d426ec409e16c1b04df6d54 to your computer and use it in GitHub Desktop.
Save kittinunf/2e85bb967d426ec409e16c1b04df6d54 to your computer and use it in GitHub Desktop.
REMOTE_NAME=xxxxx
git branch -r | grep "${REMOTE_NAME}/" | grep -v 'master$' | grep -v HEAD | sed -E "s/^[[:space:]]*${REMOTE_NAME}\///g" | while read line; do git push $REMOTE_NAME :heads/$line; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment