SVN2Git object reference error

后端 未结 2 1795
再見小時候
再見小時候 2021-01-28 02:59

My problem: Migration by an Ubunut VM in Windows; Windows had a blue screen of death; Windows restarted; the migration was damaged!

~/folder$ sv         


        
2条回答
  •  生来不讨喜
    2021-01-28 03:50

    The first problem to solve is to ensure git-fsck runs ok. Thereafter, the second problem is to be able to continue the migration.

    It is likely the first commits of the branch were correctly written to disk but the last ones failed. Try to run git reflog show refs/remotes/svn/some_branch. If it shows commits, try to find the last commit that is present: git show . Then you reset the branch: git update-ref -m 'last commit found' refs/remotes/svn/some_branch .

    Then run git fsck and fix the next branch.

    git-svn has a command git svn reset -r . svn2git will probably have a similiar one. This will allow to restart the fetch from the last correct state.

提交回复
热议问题