简体   繁体   English

跳过SVN中的SVN提交到Git转换?

[英]Skip an SVN Commit in SVN to Git Conversion?

I am doing a large migration from SVN to Git. 我正在从SVN迁移到Git。 This migration goes back through about four years of history. 这种迁移可以追溯到大约四年的历史。 I am able to successfully push commits up to a certain date, (Nov 11). 我能够成功将提交推送到特定日期(11月11日)。 On this date, there was one commit that pushed a 7GB file, and in the following commit, this file was removed (it appears to have been a mistake). 在此日期之前,有一个提交推送了一个7GB的文件,在随后的提交中,此文件被删除了(这似乎是一个错误)。

Git throws an error when attempting to push this enormous commit, and I cannot get past it. 尝试推动此巨大提交时,Git引发错误,但我无法超越它。 Is there any way simply skip that commit? 有什么办法可以跳过该提交吗? My current process is to checkout a specific commit, push it, and repeat. 我当前的过程是检出特定的提交,将其推送并重复。 I did this to find the error that I am currently facing. 我这样做是为了找到我当前面临的错误。

Thanks for all advice. 感谢您的所有建议。

Basically, you just git svn fetch until the commit immediately before the bad commit you want to skip, then fetch beginning at the commit immediately after the bad commit. 基本上,您只需git svn fetch直到要跳过的错误提交之前的提交,然后从错误提交之后的提交开始立即进行获取。 Keep in mind, skipping a commit will cause problems if other files were created or modified in this commit, and later commits depend on those modifications. 请记住,如果在此提交中创建或修改了其他文件,则跳过提交会导致问题,以后的提交取决于这些修改。

git svn fetch -r BASE:<BAD REVISION>
git svn fetch -r <BAD REVISION>:HEAD

There's a great thread on this on the main git mailing list. 在主要的git邮件列表一个很棒的话题。 @me_and posted a similar solution to a similar question in this post as well. @me_and在这篇文章中也针对类似问题发布了类似的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM