I’m moving a project from a really big, shared Subversion repo to its own Git repo. I’ve already decided to just export the latest version from trunk rather than dumping/cloning the whole project history (for reasons outlined here) and using that as the first commit for the Git repo. However, I also have a couple tags in the SVN repo that I would like to store in Git. I know I can make an annotated tag in Git that is a complete object as opposed to a reference to a particular commit, but is there a way to do that using code from outside the Git repo? Or, am I better off committing each Subversion tag to the Git master in sequence, and then creating a tag in Git off of each commit, then topping it off with what is currently in the Subversion trunk?
FWIW, the new Git repo is a hosted SaaS so I don’t have command line access, and the source Subversion server is running Windows.
I would simply grab the oldest revision that all tags and branches have in common. Commit that as the start. Then script checkouts of each branches’ and tags’ history to be interleaved with
git add -A && git commit. Treat svn tags as branches in git.You could also just skip that and after you do the common base commit at the root, branch, export the working tree from that branch in SVN and commit that. This will give you the latest commits on all the branches and tags. It’s not worth it to import svn history. Way too painful.