Make sure you have read permissions to the to be converted SVN repository, see https://wiki.its.bfh.ch/doku.php?id=subversion.
Clone existing svn repo:
git svn clone --username=${USER} https://svn.bfh.ch/repos/${REPO}
Prepare authors file:
cd ${REPO} &&
git log | awk '/^Author: / { print $2 }' | sort -u > ../${REPO}-authors &&
cd ..
Manually complete authors file with entries like this:
bad9 = Daniel Baumann <daniel.baumann@bfh.ch>
Clone existing svn repo again:
git svn clone --authors-file ${REPO}-authors --localtime --no-metadata --preserve-empty-dirs --username=${USER} https://svn.bfh.ch/repos/${REPO} ${REPO}-git
Note
Depending on the repository history, you might not want to use --preserve-empty-dirs
Convert svn ignore to git ignore:
cd ${REPO}-git &&
git svn show-ignore > .gitignore &&
git add .gitignore &&
git commit -a -s -S -m "Converting svn:ignore properties to .gitignore." &&
cd ..
Create a new Git repository on git.bfh.ch:
ssh git@git.bfh.ch create staff/${USER}/${REPO}
Upload converted repository to git.bfh.ch:
git remote add origin git@git.bfh.ch:staff/${USER}/${REPO}.git && git push --all
Login to git.bfh.ch and change set the creator to the user you have migrated the repository for:
/srv/git.bfh.ch/git/staff/${USER}/${REPO}/gl-creator
Write the user a email following the template, and also mention the location of the converted repository.
For every new ‘small’ repository create one copy from the ‘big’ repository.
In every ‘small’ repository remove all unwanted files:
git filter-branch --tree-filter 'rm -rf ${FILES|DIRECTORIES}' HEAD