I had a Subversion / SVN repository and because I moved to Git version control, I just used the last stand of the SVN trunk to initialise the new Git repository. So I lost the SVN history in the Git repository.
Later I used: git svn clone SVN_REPO
, so that I got the complete SVN history to a Git repository.
Now, I need to import that Git repository / history into my already existing Git repository.
How can I solve this problem?
Importing history won't be an issue at all - just add your git-svn repo as a remote and fetch. The problem is that at this point you'll get two unrelated history trees.
If you don't have many distinct living branches in your git repo, you might get away with simple rebase, e.g. given
sha-initial
is your first commit to the git repo andsha-initial-svn
is corresponding git-svn revision :Will replay the history of your
HEAD
on top of the svn history.