我们如何在共享工作环境中使用版本控制?
目前,我们的团队(网络开发人员、一名设计师和一名文案撰稿人)都在不同的工作站上工作,但在同一开发环境中进行更改(我们都安装相同的共享驱动器),这是一个营销网站而不是网络应用程序,因此无需构建或部署,一旦完成,我们只是将更改推送到实时站点,但我认为保留文件版本(尤其是服务器端代码)对我们来说很重要,即使它只占我们内容的一小部分(主要是静态页面) 。
我想在我们的工作设置中使用版本控制,但我不确定 SVN 或 GIT 是否可以与多个人从同一开发环境签入/签出一起使用。我拥有使用 SVN、CVS、GIT、Perforce 和 PVCS 的现有经验,但一直在个人开发环境中工作。
我想要一个不需要我们运行单独的开发环境的解决方案,因为我们缺乏基础设施。
Currently our team (web devs, one designer and one copywriter) all work on separate workstations but do our changes on the same dev environment (we all mount the same shared drive), it's a marketing site and not a web application, so no builds or deployments, we just push changes to the live site once they are done, but I think it's important for us to keep versions of files, especially serverside code, even if it only makes up a tiny percentage of our content (mostly static pages).
I'd like to use version control for our work setup, but I'm not sure if SVN or GIT will play along with more than one person checking in/out from the same dev environment. I've got existing experience with SVN, CVS, GIT, Perforce and PVCS but have always worked with individual dev environments.
I'd like a solution that doesn't require us to run separate dev environments as we lack the infrastructure.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
大多数(如果不是全部)版本控制实现都是供多个人使用的。 Subversion 和 GIT 都会很乐意做您需要的一切,但您可能会发现 Subversion 更容易快速启动和运行。如果您打算将其托管在 Windows 环境中,请查看 VisualSvn Server。
GIT 和 SVN 之间的主要区别在于,GIT 是分布式系统,而 SVN 依赖于中央存储库。在软件开发中,有很多关于使用分布式系统的充分论据,但您所描述的需求可以通过更简单的 SVN 实现轻松满足(我认为)。
使用 SVN(在 Windows 下)的另一个很好的理由是 TortoiseSvn 客户端 是用户的最佳示例之一与任何版本控制系统的接口。它非常容易学习如何使用,并且有详细的文档记录,并且得到操作系统社区的支持。
如果您不想承担维护自己的源代码控制服务器的开销,那么也值得研究托管版本控制系统的各个提供商。
Most, if not all, version control implementations are intended to be used by more than one person. Both Subversion and GIT will happily do everything you require but you might find Subversion easier to get up and running with quickly. If you intend to host it in a Windows environment, take a look at VisualSvn Server.
The major difference between GIT and SVN is that GIT is a distributed system whereas SVN relies on a central repository. In software development, there are good arguments for using a distributed system but the needs you describe would be easily served by the much simpler SVN implementation (I think).
Another good reason for using SVN (under Windows) is that the TortoiseSvn client is one of the best examples of a user interface to any version control system. It is extremely easy to learn how to use and well documented as well as supported by the OS community.
It may also be worth investigating the various providers of hosted version control systems if you don't want the overhead of maintaining your own source control servers.
您不需要大量服务器硬件。为什么每个开发人员/设计师等不能在自己的计算机上运行该网站?你们每人至少有一台电脑吗? :)
GIT 或 SVN 在这种情况下只是一个品味问题。
You don't need lots of server hardware. Why can't each dev/designer/etc run the site on their own computer? You do have atleast one computer each? :)
GIT or SVN in that case is just a matter of taste.
我们过去在旧工作场所执行此操作的方式是为每个用户提供一个帐户,并提供“项目”和帐户。我们每个人都会检查一份本地工作副本。该项目(在您的情况下,我猜这将是您企业中的人员使用的工具)也会查看副本。一旦开发人员对某个构建感到满意,我们就会发布项目工作副本的更新。
在您的设置中,您说你们都有相同的开发环境。您的意思是你们每个人在网络上都有自己的电脑,还是共享一台电脑?无论哪种方式,您都应该能够拥有自己的 svn 帐户和本地工作目录,因此这不会成为问题。
the way we used to do this at an old workplace was to give each user an account, and give the "project" and account as well. We would each check out a local working copy. the project (in your case it would be the tools that people in your business use i guess) would check out a copy too. Once the devs were all satisfied with a certain build, we would issue an update to the project working copy.
In your setup you say that you all have the same dev environment. do you mean you each have your own PC on the network, or are you sharing a PC? either way you should be able to each have your own svn accounts and local working directoires, so this would not be a problem.
根据您所讨论的数据量,可以考虑的选项是 Dropbox (< em>“安全备份、同步和文件共享变得简单”)。它支持版本控制,并允许您共享文件夹。
它还具有提供数据异地备份和远程 Web 访问的优点。
Depending upon the amount of data you are talking about, an option to consider would be Dropbox ("secure backup, sync, and file sharing made easy"). It supports versioning, and lets you share folders.
It also has the benefit of providing offsite backup of, and remote web access to, your data.
使用 svn,您可以让每次提交自动触发实时站点的更新。仍然让每个人都在同一个目录中工作有点尴尬(因为一直以来都是这样……),但是旧习惯很难改掉,假设人们坚持这样做,svn 确实通过 WebDAV 导出其存储库,所以应该可以挂载它作为桌面计算机上的网络文件系统。
With svn, you can have each submit automatically trigger an update of the live site. Still having everyone work in the same directory is somewhat awkward (as it was all the time, anyway …), but old habits die hard and assuming people insist on that, svn does export its repository via WebDAV, so it should be possible to mount it as a network filesystem on the desktop machines.
“目前我们的团队(网络开发人员、一名设计师和一名撰稿人)都在不同的工作站上工作,但在同一开发环境中进行更改(我们都安装相同的共享驱动器)”添加 SVN将消除对共享驱动器的需要。你们每个人都将在签入 SVN 的本地目录中工作。 Tortoise 将是您的完美客户端。
“这是一个营销网站,而不是 Web 应用程序,因此无需构建或部署,我们只需在完成后将更改推送到实时网站”一个简单的批处理作业(ANT 脚本或其他)可以写下来并发送给你们每一个人。文件准备好部署后,只需执行批处理并让它从 SVN 中检出最新文件并复制到您的 Web 服务器。
"Currently our team (web devs, one designer and one copywriter) all work on separate workstations but do our changes on the same dev environment (we all mount the same shared drive)" Adding SVN would do away with the need for the shared drive. You would each work in a local directory that is checked in to SVN. Tortoise would be a perfect client for you.
"it's a marketing site and not a web application, so no builds or deployments, we just push changes to the live site once they are done" A simple batch job (ANT script or other) could be written and given to each of you. Once the files are ready for deployment simply execute the batch and have it check out the latest files from SVN and copy to your web server.
“不需要我们运行单独的开发环境,因为我们缺乏基础设施”
没有多大意义。
想必,你们每个人都有一个单独的工作站。并且您的工作站与网络服务器是分开的。只是猜测,但这很典型。
很简单,每个人都可以在自己的工作站上拥有一个私人开发副本。然后您可以使用 SVN 来同步您的各种更改。
您可以将版本标记为“good to go”。
当一切看起来都正确时,有人可以在网络服务器上进行更新,以将正式版本投入生产。
这不需要比您已有的基础设施更多的基础设施。
"doesn't require us to run separate dev environments as we lack the infrastructure"
Doesn't make a lot of sense.
Presumably, each of you has a separate workstation. And your workstations are separate from your web server. Just guessing, but that's typical.
You can -- trivially -- each have a private development copy on your workstations. You can then use SVN to synchronize your various changes.
You can tag a version as "good to go".
Someone can -- when you've got everything looking right -- do an update on the web server to get the official version into production.
This doesn't require any more infrastructure than you already have in place.
使用 SVN,您可以让开发人员提交到服务器,并让一名特殊用户在服务器上检查最新版本。因此,提交工作需要提交到 SVN,然后登录到服务器并检查最新的主干。
您可以对 git 和其他分散版本控制系统使用相同的模式。这些系统的优点是它们不强制执行中央服务器模式。例如,开发人员 a 可以推送到 b,然后 b 将其推送到服务器。
With SVN you can have the devs commiting to the server, and have one special user at the server checking out the latest version. So commiting you work involves commiting to SVN, then logging in to the server and do a checkout of the latest trunk.
You can use the same pattern with git and other decentralized version control systems. The advantage with these systems is that they don't enforce the central server pattern. Dev a could for instance push to b which then pushes it to the server.