LoginSignup
18
17

More than 5 years have passed since last update.

GitからSVNへの移行

Posted at

これは何?

git から SVNへリポジトリを移行する場合の手順について調べた覚書

手順

SVN 事前準備

  1. SVNリポジトリの作成
  2. SVNリポジトリに、trunk, tags, branchesフォルダーを作り、コミットする。

移行

  1. svnリポジトリをクローン。 git svn clone -s [your-svn-path] ※[your-svn-path]はhttp://xxxxx:8969/xxxx/svn/xxxx/ 形式でOK
  2. migration用ブランチの作成 git checkout -b migration
  3. 移行したいデータを持ってくる git pull --rebase [your-git-path] ※[your-git-path]はhttp://xxxx.xxx/xxx/xxx.git 形式でOK
  4. svnのコミット(Trunk, Tags, Branchesを作ったコミット)を適用する。 git rebase master データ量が多い場合、すごく時間(5-6時間?)かかります。
  5. migration用ブランチからmasterブランチへマージ git merge migration こちらもデータ量が多い場合、すごく時間(5-6時間?)かかります。
  6. svnのリポジトリへコミット git svn dcommit
  7. 履歴が移行されていることを完了

注意点

  • コミットログにAuthorとEmailが全て記入されていないと、エラーになります。

参考サイト

18
17
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
17