Created
March 24, 2011 00:05
-
-
Save cosimo/884307 to your computer and use it in GitHub Desktop.
Convert svn tags to git tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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