Git svn clone: How to defer fetch of revision history

前端 未结 3 1977
忘了有多久
忘了有多久 2020-12-13 09:42

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

3条回答
  •  隐瞒了意图╮
    2020-12-13 10:17

    git svn fetch appears to "remember" the revisions it's seen previously. I've been having success with doing ranges:

    git svn fetch -r 0:100
    git svn fetch -r 100:200
    git svn fetch -r 4500
    git svn rebase
    git svn fetch -r 200:300
    

    I fetched the most recent revisions and then started "filling in" the gaps. It seems to work fine.

    Jesper -- if your repository doesn't have a revision 1000, then there's nothing for it to fetch. Make sure the revision numbers you're using are valid!

提交回复
热议问题