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

后端 未结 5 687
醉话见心
醉话见心 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:47

    I believe I have two sets of git binaries installed on my Windows machine:

    a. Git (whatever the typical Windows installation is--forgot where I got it). This one installs the "Git Bash Here" choice on the right-click file explorer context menu.

    b. Tortoise Git.

    I received the error when cloning a non-standard svn repository using "Git Bash" (i.e. Git).

    I then tried using TortoiseGit (as suggested by one poster here), and that worked without errors.

    However, TortoiseGit displays the actual command line it is using, and I became suspicious because that command line is the same as I used unsuccessfully with Git.

    I then tried "Git Bash" again and provided the full path to what I believe is the TortoiseGit git binary, i.e.:

    "C:/Program Files/Git/bin/git.exe" svn clone svn://localhost/dtapublic tempgitrepo
    

    and that worked fine.

    However,

    git svn clone svn://localhost/dtapublic tempgitrepo
    

    causes the error.

    I believe there are possibly two git binaries in play, and that is why TortoiseGit cured the problem for one poster. The git binary shipped with "Git" does not work for non-standard svn repositories, and the git binary shipped with "TortoiseGit" does work.

提交回复
热议问题