将存储库从 git 转换为 subversion [英] Converting a repository from git to subversion

查看:34
本文介绍了将存储库从 git 转换为 subversion的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除了这样做的原因之外,是否有一种合理的方法可以将整个 git 存储库转换为 subversion?

Reasons for doing this aside, is there a reasonable way to convert an entire git repository to subversion?

我只能找到大量关于将 from subversion 迁移到 git,以及在两者之间交换变更集的信息,但不能对整个 git 存储库进行简单的转换到svn.

I can find only tons on information on migrating from subversion to git, and exchanging changesets between the two, but not for doing a simple conversion of the entire git repository to svn.

推荐答案

在这个方向上进行转换的一般问题是 Git 存储库可以包含的不仅仅是修订的线性历史记录,正如 Subversion 所期望的那样.具有不同历史和频繁合并提交的多个祖先都是可能的,这在 Subversion 存储库中无法轻松表示.

The general problem with doing conversions this direction is that Git repositories can contain more than just a linear history of revisions, as Subversion would expect. Multiple ancestries with divergent histories and frequent merge commits are all possible, which can't be easily represented in a Subversion repository.

对于在 Git 存储库中确实有线性历史记录的简单情况,您可以使用 git-svn dcommit 将批次推送到否则为空的 Subversion 存储库.

For simple cases where you do have a linear history in your Git repository, you can use git-svn dcommit to push the lot up to an otherwise empty Subversion repository.

这篇关于将存储库从 git 转换为 subversion的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆