subversionからgitに移行したい。でもいままでのhistoryは引き継ぎたい。かといってsubversionのすべてのブランチはもういらない。というときに使える方法
移行先Gitリポジトリを作る
git init --bare newrepo.git
手元に空のgitリポジトリを持ってくる
git clone http://git.example.com:newrepo.git
.git/configを変更してsvn-remoteリポジトリの指定を追加。
fetch = ~ の部分でsvn上のtrunkとgit上のmasterを紐付ける
.git/config
[svn-remote "svn"]
url = http://svn.example.com/oldrepo
fetch = trunk:refs/heads/master
svnからfetchする。これでhistoryが取り込める。
git svn fetch
リモートのgitリポジトリにpushする
git push origin master