Git vs Mercurial vs SVN [英] Git vs Mercurial vs SVN

查看:96
本文介绍了Git vs Mercurial vs SVN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能存在重复:



$>对于家庭项目,Mercurial或Git(或其他DVCS) b $ b
什么是相对优势和Git,Mercurial和Bazaar的弱点?


什么是一些这些源代码管理系统的区别?哪一个是最适合小型2人项目的?

解决方案

SVN与Git和Mercurial不同,它是一个所有用户必须提交并承诺的单一存储库。

Git和Mercurial具有分布式模型。这意味着每台计算机上都有一个存储库,通常会有一个官方存储库,人们会选择将其更改和撤消。

Git和Mercurial非常相似。我更喜欢Mercurial,因为我发现它更容易使用。对于一个2人的团队,我会推荐Mercurial,但这只是我的看法。如果您不熟悉版本控制,那么您仍然需要花时间学习使用任何选项,但Mercurial对我来说似乎是最简单的。



要启动Mercurial存储库,您只需打开一个shell并cd到您想要进行版本控制的目录,然后键入 hg init 。这创建了存储库。要将文件夹中的所有内容添加到存储库,请键入 hg add。。以下是一些其他各种命令:


  • 提交本地更改: hg commit -m更改描述

  • 从服务器拉到最新版本: hg pull

  • 推送本地更改: hg push


Possible Duplicates:
For home projects, can Mercurial or Git (or other DVCS) provide more advantages over Subversion?
What are the relative strengths and weaknesses of Git, Mercurial, and Bazaar?

What are some of the differences between these source control system? Which one is the best for a small 2 people project?

解决方案

SVN is different from Git and Mercurial, in that it is a single repository that all users have to pull and commit to.

Git and Mercurial have a distributed model. This means that there is a repository on every computer and there is usually an "Official" repository that people will choose to commit their changes to and pull from.

Git and Mercurial are extremely similar. I prefer Mercurial because I found it much easier to use. For a 2 person team I would recommend Mercurial, but that is just my opinion. If you are not familiar with version control then you are still gonna have to spend your time learning to use any of the options, but Mercurial seemed the easiest for me.

To start a Mercurial repository all you have to do is open a shell and cd to the directory you want to have version control in, and type hg init. That creates the repository. To add everything in the folder to the repository, type hg add .. Here are some other various commands:

  • To commit the local changes: hg commit -m "Descriptions of changes"
  • To pull to the latest version from the server: hg pull
  • To push the local changes: hg push

这篇关于Git vs Mercurial vs SVN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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