Migrating a Subversion repository
When possible, it is recommended to completely migrate a Subversion repository to Git; this is quite simple to do and mostly depends on the size of the Subversion repository and the organization.
If the repository follows the standard layout described earlier, a migration takes only a matter of minutes.
Retrieving the list of Subversion users
If your Subversion repository has been used by different people, you are probably interested in preserving commit author's names as is even in the new Git repository.
If the awk
command is available (maybe using Git Bash shell or Cygwin while in Windows), there's a script here that fetches all the users from Subversion logs and appends them to a text file we can use in Git while cloning to perfectly match Subversion users even in Git-converted commits:
$ svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors.txt
Now, we will use the authors.txt
file in...