简体   繁体   English

从git-svn迁移到纯git

[英]Migrate from git-svn to pure git

We currently have a subversion server with a bunch of data in it (~20Gb). 目前,我们有一个包含大量数据(约20Gb)的Subversion服务器。 However, everyone uses git svn for talking to that server. 但是,每个人都使用git svn与该服务器通信。

We'd like to move to using pure git, but we don't want to set up a server for this, just have the git repository on a fileshare. 我们想转向使用纯git,但是我们不想为此设置服务器,只需将git存储库放在文件共享上即可。

What's the best way of setting this up? 进行此设置的最佳方法是什么? Ideally the version on the file server should be a "bare" repository, but ideally also be able to pull svn updates for a bit as some commits might be done while I'm cloning. 理想情况下,文件服务器上的版本应为“裸露”存储库,但理想情况下还可以拉出svn更新,因为在克隆时可能会完成一些提交。

[Note: everything is Windows] [注意:一切都是Windows]

If you want to have a pure "bare" Git server synchronized with your SVN repository, you can try SubGit . 如果要使纯“裸机” Git服务器与SVN存储库同步,可以尝试SubGit

Not only every SVN update will get into it, but also vice versa: every push to the Git repository will get translated into SVN. 不仅每个SVN更新都将加入其中,反之亦然:每次对Git存储库的推送都将转换为SVN。

To setup this mirror run 设置此镜像运行

$ subgit configure --svn-url SVN_PROJECT_ROOT_URL --layout auto --trunk trunk repo.git

Then adjust repo.git/subgit/config according to your needs and then run 然后根据需要调整repo.git / subgit / config,然后运行

$ subgit install repo.git

After that if you can clone repo.git directly: 之后,如果您可以直接克隆repo.git:

$ git clone repo.git wt/

or setup an access to it eg with git-http-backend and work with it as with normal Git repository. 或使用git-http-backend设置对它的访问,并像普通的Git存储库一样使用它。

See Quick Howto for more details. 有关更多详细信息,请参见快速入门

Disclaimer: I'm one of SubGit developers. 免责声明:我是SubGit开发人员之一。

Well..... I guess you could set up a repo on a server and you could set up a cronjob (or scheduled task, whatever) that will run git svn fetch to sync up with whatever shows up on svn and then move a "local" branch to the svn branches so that people can "see" them. 好吧.....我想您可以在服务器上设置一个存储库,并且可以设置一个cronjob(或计划任务,无论如何),它将运行git svn fetch与svn上显示的内容进行同步,然后移动一个“本地”分支到svn分支,以便人们可以“看到”它们。 Developers working on git could add this repo as a remote (say: origin, or "mainrepo") and then it becomes a matter of seeing how you will set up the repos to start sharing stuff (which is a whole topic in and of itself). 使用git的开发人员可以将此仓库添加为远程仓库(例如:origin或“ mainrepo”),然后就可以查看如何设置仓库以开始共享内容(这本身就是一个完整的话题) )。

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

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