简体   繁体   中英

Skip an SVN Commit in SVN to Git Conversion?

I am doing a large migration from SVN to 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). 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).

Git throws an error when attempting to push this enormous commit, and I cannot get past it. 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. 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. @me_and posted a similar solution to a similar question in this post as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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