Svn/Git 用于两人 drupal 项目?
与远程人员一起进行 Drupal 开发的最佳方法是什么?我们只有两个人,所以 cvs /svn 是不是太过分了?有在线解决方案吗?
What is the best method to work with remote person on drupal development? We are only two people so is cvs /svn is overkill? Is there an online solution for things?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
始终,始终使用源代码管理。
没有例外。
没有借口
即使一个项目只有 1 个人工作,实用源控制带来的收益远远超过使用它的成本。
当有 2 个人在一个项目上工作时,不使用源代码管理无异于自杀,因为当另一个人不小心覆盖了包含您刚刚花费数小时进行的更改的文件时,您还会做什么?
有些源代码管理更容易设置。我本人喜欢 git,因为
我们就完成了。
您可以在稍后解决其余的分发问题,并且不会有无法及时返回并查看您更改的内容的风险。
Always, Always use source control.
NO EXCEPTIONS.
NO EXCUSES
Even when there is only 1 person working on a project, the utility source control brings much greatly outweighs the costs of using it.
When there is 2 people working on a project, not using source control is tantamount to suicide, because what else will you do when another person accidentally overwrites your file containing the changes you just spent hours working on?
Some source control is easier to set up. I myself, love git, because
and we're done.
You can work out the rest of the distribution stuff at a latter point, and not have the risk of not being able to go back in time and see what you changed.
即使您单独处理一个项目,我也建议使用某种版本控制。当然,许多版本控制解决方案的功能之一是合并,但如果您问我,您拥有所有所做更改的历史记录这一事实就是最强大的功能。
所以 CVS/SVN 是不是太过分了,我不相信会这样,除非你只是想玩玩而不是构建一些具体的东西。有很多在线解决方案,例如 github 和 google code,但其成本取决于您的项目是否开源。
I would advice to use some sort of version control even if you are working alone on a project. Of course one of the features of many version control solutions is merging, but the fact that you have a history of all changes that are made is the most powerful feature if you asked me.
So is CVS/SVN overkill I dont believe it will be unless you are going to play around and not building something concrete. There are many online solutions like github and google code but the costs of this depend on you project open source or not.
我对我开发的所有内容都使用版本控制,即使只是一个 10 行脚本。 (嗯,我不会将它用于堆栈溢出答案示例。)有时,我会在初始开发过程中运行一个本地 VCS,然后切换到项目 VCS。
它完全适合 2 人项目,事实上,尝试在没有它的情况下相处几乎是不文明的。它将节省您的时间,并为您未来的协作工作做好准备。
有很多 svn 存储库的在线提供商和一些知名的 git 服务,
请避免使用 CVS。 20 年前这是一个巨大的进步,它一度统治了 VCS 领域,但今天你不应该在新项目中触及它。
I use version control for everything I develop, even if it's just a 10-line script. (Well, I don't use it for stack overflow answer examples.) Sometimes I run one local VCS during initial development and then switch to a project VCS.
It's completely appropriate for a 2-person project, in fact, it's almost uncivilized to try and get along without it. It will save you time and prepare you for future collaborative work.
There are lots of online providers of svn repositories and some well-known git services too,
Avoid CVS. It was a huge step forward 20 years ago and it ruled the VCS landscape for a while, but you shouldn't touch it today for a new project.
为了回答实际问题并给出提示,我们使用 Drupal 的源代码控制方法是将
/yoursite/sites/
添加到源代码控制中。这样,所有模块和主题内容都会保存到版本控制中,而不是您无论如何都不会接触的 Drupal 核心。将忽略设置为settings.php和文件文件夹也是一个好主意,后者取决于是否会有很多文件(用户上传的图像等是否应该受源代码控制是有争议的,我们认为它们不应该是)。
To answer the actual question and give a tip, our source control method with Drupal is to add the
/yoursite/sites/
into source control. That way all modules and theme stuff are saved into revision control, not the Drupal core which you aren't ment to touch anyway.Setting ignores to settings.php and files folders is a good idea as well, latter depending on if there will be a lot of files or not (it's arguable if user uploaded images etc. should be source controlled, we don't think they should be).