I'm looking at svn2git to do some conversions, but am confused about one thing. We have a number of people in our SVN repo history, who made changes and committed code, who are not here anymore. Do I need to create their accounts in Git, even though they are no longer with the company, for the conversion to work?
-
Git has no concept of an "account", can you clarify? – 1615903 Jul 29 '16 at 08:35
-
it was the history I was wondering about, and whether or not the import would fail if the person wasn't there. – CargoMeister Aug 04 '16 at 17:49
2 Answers
You do not need to create accounts -- but under the common import procedures they need an entry in a file authors.txt
you reference to provide a mapping of svn account (names) to emails (as id) as used in git.
E.g. I have done the following for several dozen repos:
git svn clone svn+ssh://user@host/svnroot/repo gitrepo \
--no-metadata -A authors.txt
and if the users is missing in authors.txt
the process aborts.

- 360,940
- 56
- 644
- 725
There are pleny tools called svn2git
, the probably best one is the KDE one from https://github.com/svn-all-fast-export/svn2git. I strongly recommend using that svn2git
tool. It is the best I know available out there and it is very flexible in what you can do with its rules files.
From your question I assume you are not using the one I mentioned. As there the default is to use <svnusername>@localhost
if not configured otherwise. You can give the tool a default hostname so that the default is to use <svnusername>@your-host.com
or (additionally) you can provide a file with mappings that maps users to committer / author strings like Your name <your.name@your-host.com>
.
You never need any users be created anywhere. The only person who needs an account is the one that has to push the repo to the Git server. The others are just committers / authors in the history he pushes. The people who commit / author and the people who push are two totally separate groups that can overlap but don't have to. Only the pushers need the right to push in your Git hosting solution.
If you are not 100% about the history of your repository, svneverever
from http://blog.hartwork.org/?p=763 is a great tool to investigate the history of an SVN repository when migrating it to Git.

- 35,631
- 4
- 76
- 102