我真的需要版本控制吗? [英] Do I really need version control?

查看:30
本文介绍了我真的需要版本控制吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Internet(各种网站和博客)上阅读了有关版本控制的所有内容.它有多棒,所有开发人员都需要使用它,因为它非常有用.

I read all over the Internet (various sites and blogs) about version control. How great it is and how all developers NEED to use it because it is very useful.

问题是:我真的需要这个吗?我是一名前端开发人员(通常只是 HTML/CSS/JavaScript),我从来没有遇到过哇,我昨天的文件!"之类的问题.我尝试使用它,安装了 SubversionTortoiseSVN,我理解版本控制背后的概念,但是......我不能使用它(对我来说很奇怪).

Here is the question: do I really need this? I'm a front-end developer (usually just HTML/CSS/JavaScript) and I NEVER had a problem like "Wow, my files from yesterday!". I've tried to use it, installed Subversion and TortoiseSVN, I understand the concept behind version control but... I can't use it (weird for me).

好的,所以……那不好吗?我通常一个人工作(自由职业者)并且我没有客户要求我使用 Subversion(但这样做永远不会太晚,对吧?).那么,我应该开始并努力学习使用 Subversion(或类似的东西?)还是只是浪费时间?

OK, so... Is that bad? I usually work alone (freelancer) and I had no client that asked me to use Subversion (but it never is too late for this, right?). So, should I start and struggle to learn to use Subversion (or something similar?) Or it's just a waste of time?

相关问题:不使用版本控制的好借口.

推荐答案

这里有一个场景,即使您独自工作,也可以说明源代码管理的用处.

Here's a scenario that may illustrate the usefulness of source control even if you work alone.

您的客户要求您对网站进行雄心勃勃的修改.这将花费您几周的时间,并且涉及对许多页面的编辑.你开始工作.

Your client asks you to implement an ambitious modification to the website. It'll take you a couple of weeks, and involve edits to many pages. You get to work.

当客户致电并告诉您放弃正在做的事情以对网站进行紧急但更小的更改时,您已完成此任务的 50%.你还没有完成更大的任务,所以它还没有准备好上线,客户不能等待较小的变化.但他也希望将较小的更改合并到您的工作中以进行更大的更改.

You're 50% done with this task when the client calls and tells you to drop what you're doing to make an urgent but more minor change to the site. You're not done with the larger task, so it's not ready to go live, and the client can't wait for the smaller change. But he also wants the minor change to be merged into your work for the larger change.

也许您正在一个包含网站副本的单独文件夹中处理大型任务.现在您必须弄清楚如何以一种可以快速部署的方式进行细微的更改.你疯狂地工作并完成它.客户端回调进一步细化请求.您也这样做并部署它.一切都很好.

Maybe you are working on the large task in a separate folder containing a copy of the website. Now you have to figure out how to do the minor change in a way that can be deployed quickly. You work furiously and get it done. The client calls back with further refinement requests. You do this too and deploy it. All is well.

现在您必须将其合并到正在进行的主要更改中.你为紧急工作做了什么改变?你工作太快而无法做笔记.并且您不能简单地区分这两个目录,因为它们都相对于您开始的基线进行了更改.

Now you have to merge it into the work in progress for the major change. What did you change for the urgent work? You were working too fast to keep notes. And you can't just diff the two directories easily now that both have changes relative to the baseline you started from.

上述场景表明,即使您独自工作,源代码管理也可以成为一个很好的工具.

The above scenario shows that source control can be a great tool, even if you work solo.

  • 您可以使用分支来处理长期任务,然后在完成后将分支合并回主线.
  • 您可以将整组文件与其他分支或过去的修订版进行比较,看看有什么不同.
  • 您可以随时间跟踪工作(顺便说一下,这非常适合报告和开具发票).
  • 您可以根据日期或您定义的里程碑恢复任何文件的任何修订版.

对于单独工作,建议使用 Subversion 或 Git.任何人都可以自由选择其中之一,但显然两者都比不使用任何版本控制要好.好书是使用 Subversion 的实用版本控制,第二版" by Mike Mason 或 "使用 Git 的实用版本控制",作者 Travis Swicegood.

For solo work, Subversion or Git is recommended. Anyone is free to prefer one or the other, but either is clearly better than not using any version control. Good books are "Pragmatic Version Control using Subversion, 2nd Edition" by Mike Mason or "Pragmatic Version Control Using Git" by Travis Swicegood.

这篇关于我真的需要版本控制吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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