SVN2Git object reference error

偶尔善良 提交于 2019-12-02 09:17:15

There are pleny tools called svn2git, the probably best one is the KDE one from https://github.com/svn-all-fast-export/svn2git. From your question I conclude that you are not using that one, but the one that is based on git-svn. I strongly recommend using that svn2git tool. It is the best I know available out there and it is very flexible in what you can do with its rules files.

Also the whole migration that took you more than 2 weeks already will most probably be finished in a few hours as it is blazingly fast.

If you are not 100% about the history of your repository, svneverever from http://blog.hartwork.org/?p=763 is a great tool to investigate the history of an SVN repository when migrating it to Git.

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 <hash>. Then you reset the branch: git update-ref -m 'last commit found' refs/remotes/svn/some_branch <hash>.

Then run git fsck and fix the next branch.

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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!