Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a checkout from an svn repository, the host of which I no longer have access to. I would like to import this codebase into a new git repository, but I haven't been able to figure out how to import the history rather than just add the files.

Is it possible to import this history from an svn checkout into a new git repository, and if so how would I do this?

share|improve this question
    
You can use git-svn to do this. –  wyz Dec 6 '11 at 2:05
    
@wyz: Not from a checkout you can't. –  Mark Johnson Dec 6 '11 at 4:19

1 Answer 1

up vote 4 down vote accepted

Your svn checkout has none of the history locally, that's located on the SVN server. Without access to the server, all you've got is the versions of the files in your checkout.

share|improve this answer
    
This is what I was afraid of. Thanks for this. –  Caleb Thompson Dec 7 '11 at 5:40
    
@Caleb: If you had or could get a dump of the repo, you'd be in business. –  Mark Johnson Dec 7 '11 at 17:19
    
I'm not sure that I could get that, but if I could what would a 'dump' entail (more specifically, what are the commands to get one)? Related: why is it that svn checkouts do not include the history? Or am I just biased because I'm using dvcs? –  Caleb Thompson Dec 7 '11 at 18:08
    
@Caleb: On the box hosting the SVN repo (server), you'd invoke 'svnadmin dump /path/to/repo', take the resulting dump file, import it into your own SVN repo, and run git-svn against that. SVN is not a DCVS, it's a centralized system, promoted at one point as "CVS done right." –  Mark Johnson Dec 7 '11 at 22:33
    
I know it isn't a DVCS, I was referring to my use of git, not to my (prior) use of svn. Thanks for your help! –  Caleb Thompson Dec 7 '11 at 22:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.