git svn clone of a single directory of SVN repository

后端 未结 2 1926
误落风尘
误落风尘 2021-01-30 05:16

I am attempting to use git svn to clone a single directory of a SVN repository into a Git repository.

If I use git svn clone svn+ssh://path/to/repo/tr

相关标签:
2条回答
  • 2021-01-30 06:11

    You don't want the standard layout, you want something like this:

    git svn clone svn+ssh://path/to/repo/ --trunk=trunk/directory --branches=branches/*/directory --tags=tags/*/directory
    
    0 讨论(0)
  • 2021-01-30 06:11

    Prepare and enter the local project directory:

    mkdir local/project/path
    cd local/project/path
    

    Initialize the local git repository with svn remote and fetch the data:

    git svn init http://my_svn_server.com/repository/project/location
    git svn fetch
    

    Credit goes to Gabriel Saldaña: http://blog.gabrielsaldana.org/using-git-with-subversion-repository-subdirectory/

    0 讨论(0)
提交回复
热议问题