简体   繁体   English

如何使用git-svn转换具有本地修改的Subversion存储库的本地结帐?

[英]How to convert a local checkout of a Subversion repo with local modifications with git-svn?

I checked out some SVN repositories and created a project out of them. 我签出了一些SVN存储库,并从中创建了一个项目。 After some changes and configuration I found out that I can use git for my SVN repositories. 经过一些更改和配置后,我发现可以将git用于我的SVN存储库。 But the only way I found was to clone the repositories with git-svn. 但是我发现的唯一方法是使用git-svn克隆存储库。 Since I already checked out the repositories and worked on them, I'd like to convert the existing repositories. 由于我已经签出了存储库并对其进行了处理,因此我想转换现有的存储库。 Is it possible? 可能吗? What is the best way? 什么是最好的方法?

No, it's not possible. 不,不可能。 Local checkouts don't contain enough information (branches, tags, history). 本地结帐所包含的信息(分支,标签,历史记录)不足。 To convert SVN repo to git one needs access to SVN server or at least a dump from svnadmin dump . 要将SVN存储库转换为git,需要访问SVN服务器或至少要访问svnadmin dump

There are many tools and ways to convert SVN to git. 有很多工具和方法可以将SVN转换为git。 See How to migrate SVN repository with history to a new Git repository? 请参阅如何将具有历史记录的SVN存储库迁移到新的Git存储库?

You create authors files that maps SVN login names to git format name <email> and run git svn clone . 您创建的作者文件将SVN登录名映射为git格式name <email>然后运行git svn clone

There are also other tools similar to git svn . 还有其他类似于git svn工具。 There are svn2git (and fast-export ), reposurgeon and other. svn2git (和fast-export ), reposurgeon等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM