LoginSignup
1
5

More than 5 years have passed since last update.

SVN リポジトリの特定のディレクトリから Git リポジトリを作る

Posted at

SVN から Git に移行する際、ログを残したまま移行する場合に git svn コマンドを使うと思いますが、一つのリポジトリに複数のプロジェクトがディレクトリで分けて入っていたので特定のディレクトリの中身だけ取り出す必要がありました。

以下のように trunc, branches, tags にそれぞれ同じディレクトリ名を指定するとそのディレクトリ内から Git リポジトリを作成することができます。

git svn clone http://<サーバーのドメイン>/<リポジトリのパス> --trunk="<ディレクトリ名>" --branches="<ディレクトリ名>" --tags="<ディレクトリ名>" --username="<SVN のユーザー名>"
1
5
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
1
5