The situation
I have a git repo and an svn repo that both hold the same source code but different commit histories. The git repo has a lot of small well commented submits... while the svn repo has a few huge commits with comments like "Lots of stuff".
Both series of commits follow the same changes made in the code and are roughly equivalent.
The desired outcome
I would like to switch to using git-svn without loosing the detailed history from the current git repo. This should be done by 'grafting' the history from the git repo on to a svn branch of the project (branched from the point I really started using git).
Why would you do that? (history)
A while ago I started to play with git. I started by setting up a git repo in a project I had under svn control. With a little config, I had both git and svn working in parallel on the same source code.
This was a great way for me to learn and play with git, while still having the safety net of svn. It was a sandbox with real data basically. I really didn't have the time to really LEARN git but I really wanted to tinker with it. This was actually a pretty good way to learn git for me.
At first, after doing some edits, I would commit to svn and then to git... then play with git knowing my changes were safely in svn. Soon I was commiting more frequently to git than svn... now svn commits fallen to an annoying chore I have to do sometimes.
When learning the difference between git revert
and svn revert
I was VERY glad I had been checking in to the svn repo. I almost lost a few weeks work assuming that the two worked the same.
I now know the glories of git-svn and am using it happily on several other projects.
I fully realized when I started that I might loose my git repo and have setup a new one 'properly' using git-svn init
... but having played with git for a while now... I'm sure there is some way of hacking this the git history in to svn.