简体   繁体   English

在subversion和git中存储存储库

[英]Storing a repository in subversion and git

I'm currently trying to convince my company to migrate to git from subversion, and one thing that would be really helpful would be to allow me to store a repository in subversion and git at the same time (then I can show them how easy it is to do in git what they've spent an hour trying to do in subversion). 我目前正在试图说服我的公司从subversion迁移到git,有一件事情真的很有用,就是允许我同时在subversion和git中存储一个存储库(然后我可以告诉他们它是多么容易是用git做的,他们花了一个小时试图做颠覆)。 I guess that I could put my subversion repository straight into git, but this seems to leave loads of .svn artifacts in each directory. 我想我可以把我的subversion存储库直接放到git中,但这似乎会在每个目录中留下大量的.svn工件。 Does anyone know if there's a way to avoid this? 有谁知道是否有办法避免这种情况?

Using git-svn might be your best choice at the moment - it's a bidirectional interface between git and Subversion. 使用git-svn可能是您目前最好的选择 - 它是git和Subversion之间的双向接口。 You create a git repository that is essentially a Subversion working copy. 您创建一个基本上是Subversion工作副本的git存储库。 There are caveats though - you shouldn't clone that repository or do push/pulls from it. 但有一些警告 - 您不应该克隆该存储库或从中推送/拉取存储库。 See the relevant manpage. 请参阅相关联机帮助页。

I would recommend having a pilot project that you switch from Subversion to git, instead of trying to do both Subversion and git at the same time on the same code. 我建议你有一个试验项目,你可以从Subversion切换到git,而不是试图同时在同一个代码上同时做Subversion和git。 I worry about using git-svn as a stepping stone, because any problems with getting them to interoperate will likely be used to scuttle the whole git idea. 我担心使用git-svn作为踏脚石,因为让它们进行互操作的任何问题都可能被用来破坏整个git的想法。

There's plenty of commentary about how/why to move from Subversion to some DVCS. 有关如何/为何从Subversion迁移到某些DVCS的评论很多。 Here's one I like: 这是我喜欢的一个:

http://joelonsoftware.com/items/2010/03/17.html http://joelonsoftware.com/items/2010/03/17.html

You can import a svn repository into a git repository and play with it, and sync at any time with the subversion changes. 您可以将svn存储库导入git存储库并使用它,并随时与subversion更改同步。 However AFAIK you can't send the git repository changes back to the subversion one. 但是AFAIK你无法将git存储库的更改发送回subversion。

Github just started offering read/write access to the git repositories. Github刚刚开始提供对git存储库的读/写访问权限。 So it theory you could import a svn repository into a git repository in github, and continue using it with the svn tools too. 所以理论上你可以将一个svn存储库导入到github中的git存储库中,并继续将其与svn工具一起使用。 They also offer a version to be used inside your firewall. 它们还提供了在防火墙内使用的版本。

I hate to recommend it, but it may be an option that works for you. 我讨厌推荐它,但它可能是一个适合你的选项。 GitHub just announced subversion client support on Git Repositories . GitHub刚刚宣布了对Git Repositories的subversion客户端支持

Keep in mind, with new technology comes new bugs. 请记住,新技术带来了新的错误。

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

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