Skip to content

Instantly share code, notes, and snippets.

@cjlano
Created February 5, 2017 15:18
Show Gist options
  • Save cjlano/7f8cfd6e755d19c6cf0ffe2297da4f50 to your computer and use it in GitHub Desktop.
Save cjlano/7f8cfd6e755d19c6cf0ffe2297da4f50 to your computer and use it in GitHub Desktop.
richardbarry = Richard Barry <r.barry@freertos.org>
RichardBarry = Richard Barry <r.barry@freertos.org>
rtel = Real Time Engineers ltd. <info@freertos.org>
#!/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 git@github.com: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