Discussion:
Migration a Git archive to subversion
Martin Sauer
2018-07-10 15:30:15 UTC
Permalink
Hello,

I want to migrate my git project archive to subversion. In the internet
I can't find only infos about migrate from subversion to git.

Can you tell me how I can migrate my projects to svn?

Thank your for your help.

BR

martin
Eric Johnson
2018-07-10 18:07:05 UTC
Permalink
In general, this isn't precisely possible, because Git has a different
data-model than Subversion, which is probably why you don't see many tools
automating this.

Tags: In Git, a tag is just a pointer to a revision. In Subversion, a tag
is a separate revision of the repository, represented by a separate path.

Branches: Git tracks merging of branches with a special merge-commit
object, whereas Subversion uses the merge-info property. The discrepancy
can lead to subtle differences over time.

So I'm not sure you can find a fully automated tool to migrate either
direction.

However, having said all that, try the "git-svn" connector. Here's someone
with a similar sounding task:
http://www.draconianoverlord.com/2010/03/05/existing-git-into-svn.html

Eric
Post by Martin Sauer
Hello,
I want to migrate my git project archive to subversion. In the internet
I can't find only infos about migrate from subversion to git.
Can you tell me how I can migrate my projects to svn?
Thank your for your help.
BR
martin
Julian Foad
2018-07-13 11:08:18 UTC
Permalink
Martin Sauer wrote:> I want to migrate my git project archive to
subversion. [...]
"Reposurgeon" is probably the tool that will give the most reliably
correct conversion, if you are looking for a one-time conversion.

http://www.catb.org/esr/reposurgeon/

"SubGit" is probably the best option if you are looking for a solution
which keeps git and subversion synchronized for some time.

http://subgit.com/

Some of the most useful advice I found about the existing options is in
and near the "Reposurgeon" and "SubGit" sections in this page:


https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools#reposurgeon_2

While most of the information in all three links above is about
converting from svn to git, much of it also applies when converting the
other way.

(My suggestions are based on what I have read, not direct experience,
but as a core svn developer I have a good idea what to look for and I
have talked to the developers of both of those tools.)

- Julian
Nico Kadel-Garcia
2018-07-13 12:17:21 UTC
Permalink
Post by Martin Sauer
Hello,
I want to migrate my git project archive to subversion. In the internet I
can't find only infos about migrate from subversion to git.
Can you tell me how I can migrate my projects to svn?
Thank your for your help.
BR
martin
Migrating from git to Subversion is fairly unusual. I'd encourage you
to think carefully about what you're achieving. Since "git-svn"
exists, it's usually feasible to push from a live, local git
repository to a Subversion "master". Re-assembling the branch and tag
history, however, is more awkward. Do you need anything more than the
master pushed?

Loading...