我正在开始一个新的分布式项目。我应该使用SVN还是Git,为什么?
当前回答
重点是,Git是分布式VCS, Subversion是集中式VCS。分布式vcs比较难理解,但是有很多优点。如果不需要这些优点,Subversion可能是更好的选择。
另一个问题是工具支持。您计划使用的工具更好地支持哪种VCS ?
编辑:三年前我是这样回答的:
Git目前只能通过Cygwin或MSYS在Windows上运行。 Subversion从一开始就支持Windows。作为解决方案 对于Windows可能为你工作,可能会有问题,作为最 Git的开发人员在Linux上工作,没有可移植性 心灵从一开始。目前我更喜欢Subversion 在Windows下开发。几年后,这可能就无关紧要了。
现在世界发生了一点变化。Git现在在windows上有一个很好的实现。虽然我没有在windows上进行全面测试(因为我不再使用这个系统),但我很有信心,所有主要的VCS (SVN、Git、Mercurial、Bazaar)现在都有适当的windows实现。SVN的这一优势已经不复存在。其他要点(集中式vs.分布式以及工具支持的检查)仍然有效。
其他回答
SVN的2个主要优点很少被提及:
Large file support. In addition to code, I use SVN to manage my home directory. SVN is the only VCS (distributed or not) that doesn't choke on my TrueCrypt files (please correct me if there's another VCS that handles 500MB+ files effectively). This is because diff comparisons are streamed (this is a very essential point). Rsync is unacceptable because it's not 2-way. Partial repository (subdir) checkout/checkin. Mercurial and bzr don't support this, and git's support is limited. This is bad in a team environment, but invaluable if I want to check something out on another computer from my home dir.
只是我的经验。
YouTube上有一个关于这个的有趣视频。这句话出自莱纳斯·托瓦尔兹本人:google Tech Talk:莱纳斯·托瓦尔兹谈git
我会选择SVN,因为它传播更广泛,知名度更高。
我想Git更适合Linux用户。
Git在Windows下还不受本地支持。它针对Posix系统进行了优化。然而,运行Cygwin或MinGW可以让你成功运行Git。
现在我更喜欢Git而不是SVN,但是如果你来自CVS, SVN的土地,它需要一段时间才能超过阈值。
If your team is already familiar with version and source control softwares like cvs or svn, then, for a simple and small project (such as you claim it is), I would recommend you stick to SVN. I am really comfortable with svn, but for the current e-commerce project I am doing on django, I decided to work on git (I am using git in svn-mode, that is, with a centralised repo that I push to and pull from in order to collaborate with at least one other developer). The other developer is comfortable with SVN, and while others' experiences may differ, both of us are having a really bad time embracing git for this small project. (We are both hardcore Linux users, if it matters at all.)
当然,你的里程可能会有所不同。
推荐文章
- 为什么我需要显式地推一个新分支?
- 如何撤消最后的git添加?
- Rubymine:如何让Git忽略Rubymine创建的.idea文件
- Gitignore二进制文件,没有扩展名
- Git隐藏错误:Git隐藏弹出并最终与合并冲突
- 了解Git和GitHub的基础知识
- 没有。Git目录的Git克隆
- Git与Mercurial仓库的互操作性
- 忽略git中修改(但未提交)的文件?
- “git restore”命令是什么?“git restore”和“git reset”之间有什么区别?
- Git合并与强制覆盖
- Git拉另一个分支
- 在Bash命令提示符上添加git分支
- 如何更改Git日志日期格式
- git pull -rebase和git pull -ff-only之间的区别