Created
February 5, 2017 15:18
-
-
Save cjlano/7f8cfd6e755d19c6cf0ffe2297da4f50 to your computer and use it in GitHub Desktop.
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 | |
# First clone | |
# $ git svn clone --tags=tags/BackupPoints --tags=tags --stdlayout --authors-file=./freertos-authors.txt http://svn.code.sf.net/p/freertos/code freertos | |
# Remove 'BackupPoints' tag | |
# $ git branch -rd tags/BackupPoints | |
# Clean-up any traces of the BackupPoints branch | |
# $ git reflog expire --expire=now --all | |
# $ git gc --aggressive --prune=now | |
# Add github remote | |
# $ git remote add github [email protected]:cjlano/freertos.git | |
cd /home/$USER/git/freertos/ | |
#SVN fetch (rebase does not work with no-metadata?) | |
git svn fetch --quiet --quiet | |
# Change "tag-branches" into git tags | |
git for-each-ref --format='%(refname)' refs/remotes/tags | cut -d / -f 4 | while read ref; do | |
git tag "$ref" "refs/remotes/tags/$ref" | |
git branch -rd "tags/$ref" | |
done | |
# Rebase trunk onto master | |
git rebase --quiet trunk | |
# push everything to github | |
git push --quiet --mirror github |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment