How can I import a specific branch in my SVN repo to another existing GIT repo? ex. svn/my-branch --> git/my-branch
Asked
Active
Viewed 645 times
1 Answers
0
Yes, by doing something like (see: here for more details):
Define the new branch in .git/config :
[svn-remote "release-branch"] url = svn+ssh://user@example.com/source/branches/branch_name fetch = :refs/remotes/git-svn-release-branch
Import the SVN branch. SVN_BRANCHED_REVISION is the the revision when the branch happened in SVN.
git svn fetch release-branch -r SVN_BRANCHED_REVISION
In order to establish the SVN_BRANCHED_REVISION value you can use:
svn log --stop-on-copy PATH_TO_BRANCH
Hook up a local Git branch to the remote branch:
git branch --track release git-svn-release
Checkout and update
git checkout release git svn rebase

dan
- 13,132
- 3
- 38
- 49