Git svn command
All of the Subversion bridge commands in Git are based on git svn. All commands start with it. The number of related commands, this article but more introduction git svn command use, only a simple description of the most commonly used, more knowledge reference Secretary Pro git.
To organize the mapping of user name and email
In Subversion, each submitter has a user name on the host, which is recorded in the submission information. If you want to better map existing information to git author data, you need a mapping relationship from the Subversion username to the git author, because Git identifies a submitter by using a mailbox. Create a file called User.txt, each line of svn author = author Nickname < e-mail address, with the following format to represent the mapping relationship:
User.txt's Demo
Schacon = Scott Chacon <schacon@geemail.com>
Selse = Someo Nelse <selse@geemail.com>
The author name of all the authors of the SVN code can be obtained by the following command:
Get the author name of SVN submission
SVN Log--xml | grep "^<author" | Sort-u | \
Awk-f ' \<author\> ' {print $} ' | Awk-f ' \</author\> ' {print $} ' > User.txt
Get the following text, and then edit the author's message information according to the above format.
Get the name of SVN's author
Schacon
Selse
So we have the author, the mailbox user.txt that have SVN's submission record ready, and then cloning SVN's address.
Clone SVN's trunk to local
Git svn clone http://example.com/path/to/project-x/trunk \
--authors-file=users.txt Project-x
Http://example.com/path/to/project-x/trunk is the SVN project address, which uses the trunk directory.
--authors-file=users.txt is the author of the SVN information that git needs to use.
Project-x is the folder name
--no-metadata parameter can not be SVN information, suitable for use when migrating, not suitable for git SVN shared