Dropping older Git commits from history?
I have cloned an SVN repository into a Git repository, and I just want the last commits beginning from f3a5b2a
commit. I do want to retain the changes, but they can be part of that f3a5b2a
commit, I want to get rid of the unnecessary history because I don’t need it anymore and I have the old SVN repository backed up.
There are commits spanning across 7 years, I just want the commits beginning from f3a5b2a
.
One Solution collect form web for “Dropping older Git commits from history?”
I found a better way to clone an SVN repository and dropping older commits:
git svn clone -r1234:HEAD https://asdasd/ targetPath
It basically clones the given SVN repository, starting from revision 1234 until it hits the head.