Skip to content

Instantly share code, notes, and snippets.

@akm
Last active April 26, 2016 09:13
Show Gist options
  • Save akm/7411a2c709e14e8795e5dee384bb0fe6 to your computer and use it in GitHub Desktop.
Save akm/7411a2c709e14e8795e5dee384bb0fe6 to your computer and use it in GitHub Desktop.
複数のSubversionのリポジトリを一つのGitリポジトリに移行する方法 ref: http://qiita.com/akm/items/0ec3929f9abdbdcab1cb
$ git svn clone svn+ssh://host/path/to/repo1
$ export GIT_REPO=gitrepo1
$ mkdir $GIT_REPO
$ cd $GIT_REPO
$ git init
$ echo $GIT_REPO > README.md
$ git add README.md
$ git commit -m "Initial Commit"
$ export REPO=repo1
$ mkdir $REPO
$ touch $REPO/.gitkeep
$ git add $REPO/.gitkeep
$ git commit -m "create $REPO dir to merge from path/to/repo"
$ git remote add $REPO ../$REPO
$ git fetch $REPO
$ git merge -X subtree=$REPO $REPO/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment