3

I have an website on development using git as control version system, and the client insist in us to use svn to deploy the website (they don't believe that git is a stable tool to install on their server) so I'm looking for a way to continue developing using git, which my dev team already know better than svn, and just move the release code on to a svn repository, so the client can deploy on their production server.

Since this website will continually be update by my team, I don't belive in copying code, by hand, to an svn repo and than make an package on it.

I'm looking for a way to develop on git, and run a specific command that will send an git tag (which represents an version of the site) to an different svn repository, is this possible?

thanks.

4

2 回答 2

2

您需要使用git-svn

它允许您在 svn repo 和 git 之间进行操作。在本地使用 git 并提交到 svn。

于 2012-07-30T20:16:45.180 回答
1

您可以将SubGit(专为这些目的而创建)安装到您的 SVN 服务器中。之后,它会为 SVN 服务器创建一个纯 Git 接口,因此这两个接口都可以使用。每次推送到 Git 存储库都会转换为 SVN 提交,反之亦然(转换由钩子驱动)。同时推送到 Git 和 SVN 不是问题。

要安装 SubGit,请运行

$ subgit configure path/to/svn/repository
$ #optionally edit path/to/svn/repository/conf/subgit.conf to setup different parameters (like path where to create Git repository) or path/to/svn/repository/conf/authors.txt to setup non-default Git<->SVN authors mapping
$ subgit install path/to/svn/repository

默认情况下,链接的 Git 存储库将出现在 path/to/svn/repository/.git 中。

于 2012-07-30T19:58:43.960 回答