Can Git-svn be used on large, branched repositories?

前端 未结 4 1975
陌清茗
陌清茗 2021-02-07 03:46

I am trying to use Git as a frontend to a SVN repository in order to be able to use Git\'s nice features like simple branching, stashing etc.

The problem is that the SVN

4条回答
  •  庸人自扰
    2021-02-07 04:05

    Thanks for the answers. They did not really help me, though.

    This command is the best solution so far:

    git svn log --all -1 | \
      sed -n '2s/r\\([0-9]*\\).*/\\1/p' | \
      xargs --replace=from git svn fetch -r from:HEAD

    It uses git svn log --all to find the highest SVN revision number fetched so far, and fetches everything from that point onwards.

    I wish git svn fetch would have an option to behave like this. Unless the SVN revisions are changed, there is no reason git svn should fetch the same revisions over and over each time.

提交回复
热议问题