git-svn migration fatal: not a valid SHA1 update-ref refs/heads/master refs/remotes/trunk: command returned error: 128

后端 未结 5 683
醉话见心
醉话见心 2021-02-07 09:20

Trying to migrate a large but linear svn repository to git. The svn repository does not have the standard layout (trunk, branches, tags)...just one directory with the trunk.

5条回答
  •  别跟我提以往
    2021-02-07 09:39

    I think that you run the correct command. Alternatively you could run

    $ git svn clone https://coawstmodel.sourcerepo.com/coawstmodel --trunk=COAWST --authors-file=../users.txt COAWST
    

    git-svn nearly finishes its work in each case. The only thing it tries to do is to set 'master' to point to your trunk. Because of some bug it tries to set it to the wrong value but you can perform it manually with

    $ git update-ref refs/heads/master refs/remotes/git-svn
    

    If you will still have problems you may try to convert the repository with SubGit in 3 steps:

    $ subgit configure path/to/svn/repository
    #edit path/to/svn/repository/conf/subgit.conf to set trunk = COAWST:refs/heads/master and authorsFile = path/to/users.txt
    $ subgit install path/to/svn/repository
    

    The converted repository will be at path/to/svn/repository/conf/.git

提交回复
热议问题