使用 svn 进行 Web 开发的最佳方式 [英] Best way to use svn for web development

查看:28
本文介绍了使用 svn 进行 Web 开发的最佳方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的服务器上安装了 svn,想知道使用它的最佳方法是什么.例如,我有 htdocs 和 cgi-bin 的 apache 文件夹.我应该将两个文件夹都放在 svn 中吗?当我处理一个项目时,我通常将 project_name 作为每个文件夹中的文件夹 - htdocs/projname 和 cgi-bin/projname?我应该同时 svn 吗?从 htdocs 中 svn 我的图像和其他内容是一个好主意还是我应该只 svn 我的代码?

I installed svn on my server and am wondering whats the best way to use it. For example I have apache folders of htdocs and cgi-bin. Should I put both the folders in svn? when i work on a project i usually have the project_name as the folder in each - htdocs/projname and cgi-bin/projname? Should i svn both? Is it a good idea svning my images and other stuff from htdocs or should i svn only my code?

此外,是否值得 svning word 文档、psd 文件(通常很大,如 100mb 左右)?或者我应该避免它们?

Also, is it worth svning word documents, psd files (which are huge normally like 100mb or so)? Or should i avoid them?

我已经在对我的所有数据进行每日增量备份.

I am already doing daily incremental backup of all my data.

您认为小型网络开发公司应该采用的最佳策略是什么?

What do you think is the best strategy a small web development company should adopt?

非常感谢您抽出宝贵时间.

Thank you very much for your time.

推荐答案

如果您正在服务器上从 Subversion 检出您的项目以进行部署,那么您可能希望它们在同一个伞形项目下.

If you are checking out your project from Subversion on your server to deploy it, then you probably want them under the same umbrella project.

您应该考虑使用部署脚本(Ant、Rake、Perl)来自动 SCP/FTP 从您的开发机器上传您的更改,而不是从服务器上的 Subversion 检出.

You should consider using a deployment script (Ant, Rake, Perl) to automatically SCP/FTP your changes up from your development machine instead of checking out from Subversion on the server.

您应该对重新创建网站所需的任何内容以及对网站重要的任何内容进行版本控制 - 包括网站图片、CSS、JavaScript

You should version anything you need to re-create your site and anything that's important to the site - that would include site images, CSS, JavaScript

如果您看到有很多大型二进制文档并且不希望它们填满您的存储库,您可以考虑将它们放在一个单独的文件夹中,并将 Subversion 设置为忽略该文件夹.

If you for see having a lot of large binary documents and don't want them filling up your repository you could consider putting them in a separate folder and set Subversion to ignore that folder.

这篇关于使用 svn 进行 Web 开发的最佳方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆