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

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

    Every time this happened to me Git simply couldn't fetch a commit from trunk in Subversion:

    fatal: refs/remotes/trunk: not a valid SHA1
    

    Reasons:

    • You didn't specify Subversion layout when it was not standard (trunk-tags-branches). Specifically for the error - you have no /trunk.
    • You didn't fetch from revision old enough to span at least one commit into trunk (for example, using -r option).
    • Combination of the above.

提交回复
热议问题