Background and Our Needs
I first heard about distributed version control systems from Allan Odgaard on the TextMate blog. We’ve been working for about a year on Unison, which is a web application to develop online training. Our development has been so fast-paced at times we’ve been forced to push out releases more quickly than we could test them thoroughly. More than once we’ve needed to push out a less-than-stable feature for a high-profile client. We would later realize something wrong with the feature, but there was no way to go back.Branching and reverting changes in version control software is supposed to allow you to do these things, but both are so annoying in SVN that we never actually used either. We only kept a branch around when we wanted to make a release and continue development in the trunk. We would never have dared roll back any commits
Enter Distributed Version Control
Distributed Version Control promised to solve these problems for us. We would be able to branch as often as we liked, which would then allow us to keep branches around for longer without worrying about merging them later.
I first looked at git, then tried mercurial (hg) for awhile, then finally decided on git. I’m going to try to provide an unbiased review of some of their strengths and weaknesses.
Realize that both tools are good at merging, both have strong user communities, and they are very similar choices. I found good comparisons hard to come by.
Mercurial
Mercurial has several advantages over git.
Excellent Documentation: The hgbook helped me to understand the concepts
Cleaner Commands: The interface requires fewer options and flags
Intuitive Commands: The names they picked for reverting changes make more sense
Windows Support: They have a full windows client, although using it to make lots of branches would get crazy fast
It also has some disadvantages
“Named
Branches” suck: They added this feature as an afterthought. The way
everyone branches is by “cloning” a repository. So, if you want to work
in a new branch, you have to make a brand new copy of everything. The
implementation of named branches simply isn’t workable
Rewriting History is difficult: hg doesn’t have the features git does here
Git
Git has its own strengths
Branching is Supreme: This is a big
one. Git lets you make new branches at any time, and lets you switch
back and forth between them in one working copy.
Remote Branches:
Git can send and receive changes from several different public
repositories. This is useful if you need to publish more than one
branch so others can download your changes.
Merging and Rewriting
History: You can squash several commits together into one big commit
when you merge, getting rid of the useless messages. You can easily
pull a new version of the code you’re working on into your experimental
branches.
Disadvantages
Slightly more confusing: There are more commands by default, and the reverting commands are hard to keep straight at first
The Wrapup
The interface to Mercurial is easier, and I like their mainstream approach, but git is simply far better with anything advanced. I don’t feel that Mercurial can handle making branches for each feature you are developing, and doesn’t do a good job of pushing/pulling changes from public repositories.
In the end, we picked Git. I’m going to revisit mercurial in another year and see if they’ve finished adding a few more necessary features. I wanted a DVCS in the first place so I could branch like crazy, and Mercurial really doesn’t support it well enough.
相关推荐
在软件开发中,版本控制系统是不可或缺的一部分,Mercurial 和 Git 都是广受欢迎的分布式版本控制系统。Mercurial 简洁易用,而 Git 功能强大,社区活跃。在某些场景下,我们可能需要将一个项目从 Mercurial 迁移到 ...
Mercurial和TortoiseHg是一套强大...总之,Mercurial和TortoiseHg为开发者提供了一种高效且灵活的版本控制解决方案,特别适合个人和团队协作。通过学习和实践,开发者能够充分利用这些工具来管理和协同他们的代码项目。
`git-remote-hg`是一个Python实现的Git远程助手,它使得Git能够与Mercurial(Hg)仓库进行通信。通过这个库,你可以将Git仓库作为Mercurial的远程仓库,反之亦然,实现了Git和Mercurial之间的无缝集成。这对于那些在...
作为一个开源的分布式版本控制系统,Git的核心设计理念在于让开发者能够轻松地追踪代码的变化,协作开发,并且能够回溯到任何历史版本,这对于团队合作和代码维护至关重要。 Git的分布式特性意味着每个开发者的本地...
而Mercurial则同样是另一种流行的选择,虽然不如Git那样功能丰富,但在某些场景下,它的简洁性使其成为理想的工具。Smart GIT将这两种工具整合在一个界面上,极大地提升了开发者的效率。 该版本的Smart GIT还附带了...
安装vscode后没有git bash here怎么办?安装git,来源git官网https://git-scm.com/download/win,但是下载需要进入github,无法访问。可以这届下载我这个
然而,随着分布式版本控制系统(Distributed Version Control Systems, DVCS)的出现,如Git和Mercurial,开发流程发生了革命性的变化。 **1. CVCS与DVCS对比** - **灵活性与工作流多样性**:DVCS提供了更大的灵活性...
- **分布式版本控制系统**:这类系统是目前的主流选择,代表性的有`Git`、`Mercurial`、`Bazaar`等。这些系统的特点在于,每个开发者的工作站上都完整地保存了一份版本库的副本,这不仅增强了系统的鲁棒性,还大大...
### git分布式代码管理教程 #### 一、Git简介与安装 **Git** 是一个开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目。Git 的设计目标是为了解决开发过程中代码版本控制的问题,它具有快速、数据...
而“git 分布式 mercurial”的标签,则将Mercurial与另一种著名的DVCS——Git进行了关联,暗示我们将对比两者之间的异同。 Mercurial的核心概念在于其分布式特性。与集中式的版本控制系统(如CVS或SVN)不同,每个...
以下是一些关于Git协同开发的知识点,以"git协同开发1"的标题和描述为背景: 1. **Forking项目**: - 用户访问项目原仓库(例如:https://github.com/hongmaple/HtxkEmsm),点击"Fork"按钮,将项目复制到自己的...
共享和管理Git,Mercurial和Subversion存储库的最简单方法。 非常容易安装 无需修改配置文件,SCM-Manager完全可以从其Web接口进行配置 无需Apache,无需安装数据库 中央用户,组和权限管理 对Git,Mercurial和...
- **Git的概念**:Git是一款开源的分布式版本控制系统,用于追踪在软件开发过程中对文件的修改历史,方便多用户协同工作。 - **Git的发展历程**:由Linus Torvalds于2005年创建,最初是为了更好地管理Linux内核源...
Git 是一个开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目。它可以跟踪文件的变化、记录历史版本、方便团队协作开发以及实现代码的备份和恢复。 分布式架构: 与传统的集中式版本控制系统不同,...
Git是一款强大的分布式版本控制系统,由Linus Torvalds在2005年为Linux内核开发而创建。它被广泛应用于软件开发、文档管理以及协作项目,因其高效、灵活和可扩展性而受到全球开发者的青睐。由于Git的官方网站下载...
它方便查看更改历史记录,备份以便恢复以前的版本,并实现跨区域多人协同开发。 Git与SVN的区别: SVN是集中式版本控制系统,版本库是集中放在中央服务器的,工作时需要联网。 Git是分布式版本控制系统,每个用户的...
"版本控制工具比较:SVN、GIT、CVS及Mercurial" ...GIT 和 Mercurial 的分布式版本库和合并跟踪能力使其适合分布式开发项目。 在选择版本控制工具时,需要考虑项目的规模、团队的规模、开发方式等因素。