I often have the case that I want to work on a SVN repository right away. But an ordinary git svn clone [url]
also clones the entire history. So I want to speed
None of the suggested answers will work. git svn fetch
with a revision will only retrieve newer revisions than what is already cloned. You may be able to use git svn reset
to go back to an older revision and retrieve from there, but you'll have to do some dirty work afterwards to 'graft' your newer revisions back onto the full tree (the SHA1 of an SVN revision in git depends on the entire parentage of the revision). If you're handy with the scalpels git
offers you, go for it.
It's much easier to just avoid the issue.
So, that's a partial answer - how can you afterwards fetch history? Fetch it into another repo and copy what you need over. Can it be done in chunks of 1000 in reverse order? With the scalpels, and a lot of patience, it could, but it's unlikely worth it. The full fetch running forward is going to outrun the overhead of all those first revisions grabbed by each block you git svn fetch
, and the fixup will get tedious.