Skip to content

Instantly share code, notes, and snippets.

@cliffano
Created July 18, 2012 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cliffano/3133171 to your computer and use it in GitHub Desktop.
Save cliffano/3133171 to your computer and use it in GitHub Desktop.
svn2git loop in bash
#! /bin/bash
mkdir -p workspace
cd workspace
for PROJ in 'app1' 'app2' 'app3'
do
mkdir $PROJ
cd $PROJ
# for SVN repo with structure app/trunk, app/branches, app/tags
# add --trunk $PROJ/trunk --branches $PROJ/branches --tags $PROJ/tags
svn2git svn://svnhost/path/ --verbose --authors ~/authors
git remote add origin user@githost:path/$PROJ.git
git push origin master
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment