To move the tags to be proper Git tags, run First you’ll move the tags so they’re actual tags rather than strange remote branches, and then you’ll move the rest of the branches so they’re local. For one thing, you should clean up the weird references that git svn set up. You need to do a bit of post-import cleanup. Not only does the Author field look a lot better, but the git-svn-id is no longer there, either. Now you should have a nicer Subversion import in your my_project directory. $ git svn clone \ -authors-file=users.txt -no-metadata -s my_project
The metadata that Subversion normally imports, by passing -no-metadata to the clone or init command. You can provide this file to git svn to help it map the author data more accurately. (Obviously this only works on a machine with grep, sort, and perl installed.) Then, redirect that output into your users.txt file so you can add the equivalent Git user data next to each entry. That gives you the log output in XML format - you can look for the authors, create a unique list, and then strip out the XML. To get a list of the author names that SVN uses, you can run this: Schacon = Scott Chacon selse = Someo Nelse Create a file called users.txt that has this mapping in a format like this: If you want to map this to better Git author data, you need a mapping from the Subversion users to the Git authors. The examples in the previous section show schacon in some places, such as the blame output and the git svn log. In Subversion, each person committing has a user on the system who is recorded in the commit information. The first problem is the author information. However, the import isn’t perfect and because it will take so long, you may as well do it right. If you want the history, you can accomplish that as quickly as you can pull the data out of the Subversion server (which may take a while).
If you read the previous section about using git svn, you can easily use those instructions to git svn clone a repository then, stop using the Subversion server, push to a new Git server, and start using that.
PERFORCE DOWNLOAD DIRECT FROM DEPOT HOW TO
You’ll learn how to import data from two of the bigger professionally used SCM systems - Subversion and Perforce - both because they make up the majority of users I hear of who are currently switching, and because high-quality tools for both systems are distributed with Git. This section goes over some importers that are included with Git for common systems and then demonstrates how to develop your own custom importer. If you have an existing codebase in another VCS but you’ve decided to start using Git, you must migrate your project one way or another.