## Install git-svn tool
# if CentOS
yum install subversion-perl
# if Ubuntu
sudo apt-get install libsvn-perl
## In git server, Create empty repo of exfat as my project
## Create Bare repo of /repo/exfat
cd /repo
git init --bare exfat.git
cd exfat.git
cp hooks/post-update.sample hooks/post-update
git symbolic-ref HEAD refs/remotes/trunk
## Clone svn with git-svn in work repo of /repo/svn/exfat
cd /repo/svn
git svn clone -s http://exfat.googlecode.com/svn /repo/svn/exfat
cd exfat
git config core.worktree /repo/svn/exfat
git gc
## Convert SVN Tag to Git Tag
/usr/local/bin/svn2git
## Add svn ignore, if have
git svn show-ignore > .gitignore
git add .gitignore
git commit -m ‘Convert svn:ignore properties to .gitignore.’
# # Push git rep to bare repository
git remote add origin /repo/exfat.git
git push origin –mirror
## Put other svn branch into bare repo
# git branch -r
git checkout -t -b svn-trunk trunk
git push origin –mirror
git checkout -t -b svn-v1.0.x v1.0.x
git push origin –mirror
## Verify by checkout in workstation
cd /tmp/test
git clone ssh://git.zhenglei.net/repo/exfat.git
cd exfat