Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@soneyworld
Created June 17, 2014 13:12
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 soneyworld/894354acb423d236c89b to your computer and use it in GitHub Desktop.
Save soneyworld/894354acb423d236c89b to your computer and use it in GitHub Desktop.
Script to push all tags of a specified local branch to the specified remote
#!/bin/bash
ORIGIN=$1
BRANCH=$2
TAGS=$(git log --pretty='%H' $BRANCH | xargs -n1 git describe --tags --exact-match 2>/dev/null)
for t in $TAGS
do
git push $ORIGIN $t
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment