- git-svn をインストールする
- debian などでは、git とは別パッケージになっている
- 最終的な移行先の git の bare リポジトリを作成しておく(ここでは仮に repos.git というディレクトリ名にした)。
$ git init --bare --shared=true repos.git
- 移行元の svn リポジトリに commit しているユーザのリストを下記の書式で authors.txt に書き出す(このあたりは、svn の log がユーザ名のみを記録しているのに対し、 git ではユーザ名とメールアドレスを記録することにもよる)
$ vi authors.txt
hoge = hoge <hoge@your-domain.com>
fuga = fuga <foo@example.com>
- svn リポジトリを clone する(作業リポジトリが出来る)
$ git svn clone -A authors.txt --trunk= --branches=branches --prefix=svn/ ${SVN_REPOS_URL}
- 上記で出来たリポジトリの中に入り、最終的な移行先リポジトリ(はじめの方に作成した repos.git)に push する
$ git remote add origin ../repos.git
$ git push origin --all