How to keep git authorship and commit date when using git-svn to click on subversion reverse?

Let's start with the new, empty subversion repository and the existing git repository, which I would like to “click” and save all the history and authorship (even if it is only possible for the username).

Using "git svn dcommit", I can see comments on the editor in the subversion repo history, but the author’s details in subversion are used by default by default, and the commit date is today's date, click date, not the initial commit in git.

Is there a way to override these properties of interest in the same way as BZR-> SVN, with overriding and modifying bazaar.conf to the pre-revprop-change hook, but this time for Git?

Thank.

+4
source share
1 answer

You cannot save the author and dates using git-svn (just as you cannot also save ignore, anonymous branches and complex history using it).

To convert the Git repository to SVN, preserving all this, use the SubGit project:

$ svnadmin create svn.repo

$ subgit configure svn.repo

$ #edit svn.repo/conf/subgit.conf ('git.default.repository' option) 
to set path to your bare Git repository (the repository you on the server
or you can prepare new bare repository
with "git clone --bare <Git URL> path/to/bare/git/repo")

$ #optionally prepare svn.repo/conf/authors.txt file
to configure custom authors mapping

$ subgit install

After installation, SubGit synchronizes and maintains the synchronization of the SVN repository svn.repo and Git of the repository path / to / bare / git / repo, so that any SVN commit will result in a Git commit and vice versa (synchronization is done using hooks and is safe at the same time, so you can continue to use git).

To stop the synchronization from starting continuously

$ subgit uninstall svn.repo
+3
source

All Articles