Skip to content

Instantly share code, notes, and snippets.

@obeattie
Created May 21, 2010 00:06
Show Gist options
  • Save obeattie/408307 to your computer and use it in GitHub Desktop.
Save obeattie/408307 to your computer and use it in GitHub Desktop.
for branch in $(git branch -a | awk '{ print $NF }' | awk '/^tags\// { print $1 }'); do
tag=$(echo $branch | cut -f 2- -d /);
# create the tag
git checkout $branch;
git tag -a -m "Tagging svn tag $tag." $tag;
git checkout master;
# delete the branch
git branch -rD $branch;
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment