如何无缝集成subversion和git?
我正在寻找有关如何无缝集成 subversion 和 git 的技巧,以便由一小群 Web 开发人员部署网站。我们每个人在本地计算机上都有自己的网站开发版本。我们还有开发服务器、临时服务器和实时服务器。
随着我们团队的成长,我们还没有相应地更新我们的版本控制和部署策略。我们都曾检查过共享 Subversion 存储库的主干。开发人员和开发人员都登台服务器从主干的签出运行,因此更新它们需要运行“svn update”,而实时服务器作为主干的导出运行,需要“svn导出”才能获取最新的代码。在任何一种情况下,我们通常都会通过更新或导出某些文件或目录来更新这些文件。当只有一两个开发人员时,这种方法很有效。然而,一个很大的缺点是我们无法指出代表当前在任何给定时间正在直播的内容的单独标签。
为了与公司政策保持一致,我们希望继续使用 Subversion 来存储我们现在所说的“生产分支”,这将是上演和上线的内容。但是,我们希望在本地和开发站点上使用 Git。我们特别喜欢更容易合并并能够“挑选”需要上线的更新的想法。我们最初计划使用 git-svn,但它似乎在共享环境(例如我们的开发或登台服务器)中效果不佳。
还有其他人在做这样的事情吗?让它发挥作用的最佳方法是什么?或者我们是否让它变得比应有的更加困难?
I'm looking for tips on how to seamlessly integrate subversion and git, for deploying web sites by a small team of web developers. We each have our own development versions of our sites on our local machines. We also have dev, staging, and live servers.
As our team has grown, we haven't updated our revision control and deployment strategies accordingly. We had all been checking into the trunk of a shared Subversion repository. Both the dev & staging servers ran from a checkout of the trunk, so updating them involved running "svn update" while the live server ran as an export from trunk which required an "svn export" to get the latest code. In either case, we would often update just certain files by updating or exporting just those files or directories. That worked okay when there was just one or two developers. However, a big downside was that we couldn't point to an individual tag that represented what was currently on live at any given time.
In keeping with corporate policy, we'd like to continue to use Subversion to store what we're now calling our "production branch," which will be what goes onto staging and live. However, we would like to use Git on our local and development sites. We especially like the idea of easier merges and being able to "cherry pick" updates that need to go live. We had initially planned on using git-svn, but it doesn't seem to work well in a shared environment such as our dev or staging servers.
Anyone else doing something like this? What's the best way to make it work? Or are we making it more difficult than it should be?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Derick Bailey 有一些很好的方法可以做到这一点:
http://www.lostechies.com/blogs/derickbailey/archive/2010/02/03/branch-per-feature-how-i-manage- subversion-with-git-branches.aspx
Derick Bailey has some good ways of doing this:
http://www.lostechies.com/blogs/derickbailey/archive/2010/02/03/branch-per-feature-how-i-manage-subversion-with-git-branches.aspx