Skip to content

Instantly share code, notes, and snippets.

@cosimo
Created March 24, 2011 00:05
Show Gist options
  • Save cosimo/884307 to your computer and use it in GitHub Desktop.
Save cosimo/884307 to your computer and use it in GitHub Desktop.
Convert svn tags to git tags
#!/bin/bash
#
# Convert remote tags imported from SVN to real git tags
#
REMOTE_TAGS=$(git branch -r | grep 'tags/' | cut -f2 -d/)
GIT=$(which git)
for t in $REMOTE_TAGS
do
echo Converting tag $t
$GIT tag $t tags/$t
$GIT branch -r -d tags/$t
done
# You need to push them now
# git push {remote-repo} --tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment