单一开发者的源代码控制系统 [英] Source control system for single developer

查看:21
本文介绍了单一开发者的源代码控制系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于一个非常小的团队(一个开发人员),推荐的源代码控制系统是什么?

价格无所谓.客户会支付:-)
我正在使用 C++ 和更高版本的 C# 和 WPF 使用 VS 2008 开发 Vista32.为此设置一个额外的(物理)服务器对我来说似乎有点矫枉过正.

有什么意见吗?

What's the recommended source control system for a very small team (one developer)?

Price does not matter. Customer would pay :-)
I'm working on Vista32 with VS 2008 in C++ and later in C# and with WPF. Setting up an extra (physical) server for this seems overkill to me.

Any opinions?

推荐答案

我会使用 Subversion(实际上我使用它)[更新:2014 年 7 月 -- 我使用 Git -- 见结尾答案].SVN是:

I would use Subversion (in fact I use it) [update: Jul 2014 -- I use Git -- see end of the answer]. SVN is:

  • 免费,
  • 足够好(见下面的缺点),
  • 简单,
  • 在 Windows(和 Linux)上运行良好,
  • 很多人都在使用它,因此很容易获得帮助,
  • 可以与大多数 IDE 集成,即 Visual Studio(即 ankhsvnVisualSVN -- 更多信息)或Eclipse(即Subclipse -- 这里 有人问过那个).
  • free,
  • good enough (see disadvantages below),
  • simple,
  • works fine on Windows (and Linux too),
  • a lot of people use it so it's easy to get help,
  • can integrate with most of IDEs i.e. Visual Studio (i.e. ankhsvn or VisualSVN -- more info) or Eclipse (i.e. Subclipse -- here someone asked about that).

我会强烈推荐单独的机器到源代码控制服务器.充其量在云端.优点:

I would strongly recommended separate machine to source control server. At best somewhere on the cloud. Advantages:

  • 如果您的开发箱没电了,您不会丢失源代码控制存储库.
  • 您不必再为多一个盒子的维护而烦恼.

有些公司托管 SVN 存储库.

此处是各种操作系统的 SVN(客户端和服务器)包的链接.

Here are links to SVN (client and server) packages for various operating systems.

我在 Windows 机器上使用 SVN 大约 5 年,发现 SVN 有一些缺点:)

I am using SVN on Windows machine for about 5 years and found that SVN has a few disadvantages :).

SVN(或其客户端——TortoiseSVN)有一个缺点——它在大型(数千个文件)存储库上的速度非常慢(更新或提交时),除非你有SSD 驱动器.

SVN (or its client -- TortoiseSVN) has one big disadvantage -- it terrible slow (while updating or committing) on large (thousands of files) repositories unless you have SSD drive.

许多人抱怨与 SVN 合并有多难.

Many people complain about how hard merging is with SVN.

我做了大约 4 年的合并(包括大约 2 年的 CVS - 这很糟糕,但可行)和大约 2 年的 SVN.

I do merging for about 4 years (including about 2 years in CVS -- that was terrible, but doable) and about 2 years with SVN.

我个人觉得并不难——另一方面——在 CVS 中合并分支后,任何合并都很容易:)

And personally I don't find it hard -- on the other hand -- any merge is easy after merging branches in CVS :).

我每周合并一次大型存储库(实际上是两个存储库),并且很少遇到难以解决的冲突(大多数冲突通过我使用的 diff 软件自动解决).

I do merge of large repository (two repositories in fact) once a week and rarely I have conflicts which are hard to solve (most of conflicts are solved automatically with diff software which I use).

但是,如果您保持一些简单的规则,那么在几个开发人员合并的项目的情况下应该完全没有问题:

However in case of project of a few developers merging should not be problem at all if you keep a few simple rules:

  • 经常合并更改,
  • 避免同时在各个分支中积极开发.

许多开发者推荐分布式版本控制,例如GitMercurial.

Many devs recommended Distributed Version Control like Git or Mercurial.

单一开发者的角度来看,与 SVN 相比,DVCS 只有几个重要的优势:

From single developer perspective there are only a few important advantages of DVCS over SVN:

  • DVCS 可以更快.
  • 您可以提交到本地存储库,而无需访问中央存储库.
  • DVCS 是热门并且喜欢使用/学习(如果有人为您的学习付费).

而且我认为对于单个开发人员来说合并不是问题.

And I don't think merging is a problem in case of single developer.

Joel Spolsky 撰写了关于 Mercurial 的教程,绝对值得一读.

Joel Spolsky wrote tutorial about Mercurial which is definitively worth to read.

因此,尽管 DVCS 有许多优点,但如果合并或速度不是问题,我还是会继续使用 SVN.

So, despite of many advantages of DVCS I would stay with SVN if merging or speed is not a problem.

或者尝试 Mercurial,根据thisthis SO 问题,得到更好的支持(7 月2011) 在 Windows 上.

Or try Mercurial, which according to this and this SO questions, is better supported (in July 2011) on Windows.

大约一年以来,我将 Git(主要是 Git Bash)用于我的宠物项目(即解决 Euler 问题)和每个 Euler 问题的本地分支都是非常好的功能——正如它被描述为 DVCS 的优势一样.

For about a year I use Git (Git Bash mainly) for my pet-projects (i.e. solving Euler problems) and local branches for each Euler problem are really nice feature -- exactly as it is described as advantage of DVCS.

今天,Windows 上的 Git 工具比 2 年前或更多年前要好得多.您可以使用远程存储库(如 GitHub 或 ProjectLocker 等)来保持无需额外的努力/金钱即可从工作站复制您的项目.

Today Git tooling on Windows is much, much better then 2 or more years ago. You can use remote repo (like GitHub or ProjectLocker and many others) to keep copy of your project away from your workstation with no extra effort/money.

但是我使用 GUI 客户端只是为了查看差异(有时是为了选择要提交的文件),所以最好不要害怕命令行——它真的很好.

However I use GUI client only to looks at diffs (and sometimes to choose files to commit), so it's better to not afraid of command line -- it's really nice.

所以从今天起我会使用 Git.

So as of today I would go with Git.

这篇关于单一开发者的源代码控制系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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