Our organization never used Trunk, and simply created new SVN branches for each version. Is it possible to simply select the most recent branch, and create a new Git repo of that branch (with history)?
Asked
Active
Viewed 132 times
3
-
`git svn init` has plenty of configuration options. Do you have a more specific question? – Carl Norum Jan 25 '13 at 01:08
-
I've no idea why this was closed as "off-topic". It's a rather basic question, but it's about using Git and SVN, and thus totally on-topic. – sleske Jan 25 '13 at 11:33
1 Answers
2
Yes, you can simply choose to clone only one branch from the SVN repo:
git svn clone http://svn.example.com/project/mostRecentBranch
This will create a git repo with a single branch, which represents the history of "mostRecentBranch" from the SVN repo.
git svn
will try to also include history from before the branch's creation (i.e. the history of the branch that "mostRecentBranch" was copied/created from). However, this may not work if the branch was not created properly in SVN (i.e. if it was not created using "svn copy").

sleske
- 81,358
- 34
- 189
- 227
-
-
is there any way to start this at a particular revision? We have a large SVN repo with 71000 commits and my project starts at around r50000, so I'd like to skip the first 50000 commits. – Jason S Mar 20 '15 at 17:16
-
@JasonS: See [How to git-svn clone the last n revisions from a Subversion repository?](http://stackoverflow.com/questions/747075/how-to-git-svn-clone-the-last-n-revisions-from-a-subversion-repository). – sleske Mar 21 '15 at 14:46