SVN分支和虚拟主机

发布于 2024-11-05 06:06:39 字数 250 浏览 5 评论 0原文

我有 GIT 背景,现在必须使用 SVN 工作。 通常,在使用 GIT 时,我将 Apache 虚拟主机设置为一个文件夹作为文档根目录,当我想要切换分支时,我只需执行 git checkout 分支。

从我现在使用 SVN 看到的情况来看,当我创建分支时,我必须为每个分支创建一个新文件夹。这是真的吗?还是有其他方法可以实现我习惯使用 GIT 的功能?

因为,这意味着我必须创建许多不同的虚拟主机或使用通配符 dns 或其他东西。

谢谢。

I come from a GIT background and now have to work using SVN.
Usually, when working with GIT, I had Apache virtual host set up to one folder as document root and when I wanted to switch branches I just did git checkout branch.

From what I see with SVN now, when I make branches I have to make a new folder for each branch. Is that true or is there some other way to accomplish to what I'm used to with GIT?

Because, that would mean I have to make a number of different virtual hosts or use wildcard dns or something.

Thanx.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

银河中√捞星星 2024-11-12 06:06:39

您可以使用 svn switch 将工作副本切换到不同的分支(如果您想将其保留在同一目录中)。

You could use svn switch to switch your working copy to a different branch, if you want to keep it in the same directory.

栀梦 2024-11-12 06:06:39

在 Subversion 中,分支只是复制一棵树,所以是的,您将创建一个新文件夹。查看 SVN 书籍中有关分支/合并的章节: http: //svnbook.red-bean.com/nightly/en/svn.branchmerge.html

虚拟主机和 Subversion 或 git 等版本控制系统之间没有自然映射,所以恐怕我无法评论如何它可能与您的不同虚拟主机有关。也许你可以多谈谈你的设置。

In Subversion branching is just copying a tree so yes, you would be creating a new folder. Have a look at the SVN book for their chapter on branching/merging: http://svnbook.red-bean.com/nightly/en/svn.branchmerge.html

There's no natural mapping between virtual hosts and version control systems like Subversion or git so I'm afraid I can't comment on how it might relate to your different vHosts. Maybe you could talk about your setup a little more.

去了角落 2024-11-12 06:06:39

如果您遇到类似的情况:

    <VirtualHost [server's IP address]:443>
     ServerName svn.example.com
     <Location />
       DAV svn
       AuthType Basic
       AuthName "svn.example.com"
       AuthUserFile /var/local/svn/svn.example.com/conf/passwd
       AuthzSVNAccessFile /var/local/svn/svn.example.com/conf/authz
       SVNPath /var/local/svn/svn.example.com
       Require valid-user
     </Location>

    </VirtualHost>

您不必担心显式处理不同的分支。

If you are having something like:

    <VirtualHost [server's IP address]:443>
     ServerName svn.example.com
     <Location />
       DAV svn
       AuthType Basic
       AuthName "svn.example.com"
       AuthUserFile /var/local/svn/svn.example.com/conf/passwd
       AuthzSVNAccessFile /var/local/svn/svn.example.com/conf/authz
       SVNPath /var/local/svn/svn.example.com
       Require valid-user
     </Location>

    </VirtualHost>

you don't have to worry about handling different branches explicitly.

花开半夏魅人心 2024-11-12 06:06:39

完成您习惯使用 git 的操作的一种方法是使用 git-svn

A way to accomplish what you are used to with git is to use git-svn.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文