SVN分支和虚拟主机
我有 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以使用
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.在 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.
如果您遇到类似的情况:
您不必担心显式处理不同的分支。
If you are having something like:
you don't have to worry about handling different branches explicitly.
完成您习惯使用 git 的操作的一种方法是使用 git-svn。
A way to accomplish what you are used to with git is to use git-svn.