background preloader

DCVS

Facebook Twitter

Why I Like Mercurial More Than Git. After working for over a year alternating between two projects, one that uses Git for its version control and another that uses Mercurial, I have finally achieved sufficient mastery of both toolchains that I now feel comfortable defending my judgment that Mercurial is the superior of the two systems.

Why I Like Mercurial More Than Git

I think Git has one glaring deficiency that makes it the inferior tool, and I hope to describe the required remedy in this weblog posting. The tools are very similar, and many of the distinguishing differences come down to a matter of taste in my opinion. Some may consider it a deal-breaker that Mercurial expects its extensions to be written in Python, whereas Git admits extensions written in just about any language you care to imagine, but the usual approach is to write them in a shell language. That's not a deal-breaker for me. Many other differences are either consequences of that fundamental distinction, or they are cosmetic in nature. Understanding the Git Workflow. If you don’t understand the motivation behind Git’s design, you’re in for a world of hurt.

Understanding the Git Workflow

With enough flags you can force Git to act the way you think it should instead of the way it wants to. But that’s like using a screwdriver like a hammer; it gets the job done, but it’s done poorly, takes longer, and damages the screwdriver. Consider how a common Git workflow falls apart. Create a branch off Master, do work, and merge it back into Master when you’re done Most of the time this behaves as you expect because Master changed since you branched. Unfortunately, your feature branch contained checkpoint commits, frequent commits that back up your work but captures the code in an unstable state. So you add a new rule: “When you merge in your feature branch, use –no-ff to force a new commit.” Then one day you discover a critical bug in production, and you need to track down when it was introduced.

You narrow the bug to a single file. Rethinking Revision Control So which approach do you choose? DVCSAnalysis - support - Analysis of Git and Mercurial - User support for Google Project Hosting. Note: this analysis was done in summer 2008, when we first began scoping work for DVCS support in Google Code.

DVCSAnalysis - support - Analysis of Git and Mercurial - User support for Google Project Hosting

Introduction This document summarizes the initial research for adding distributed version control as an option for Google Code. Based on popularity, two distributed version control systems were considered: Git and Mercurial. This document describes the features of the two systems, and provides an overview of the work required to integrate them with Google Code. Distributed Version Control In traditional version control systems, there is a central repository that maintains all history. Distributed Version Control Systems (DVCS) use a different structure. DVCS's provide a lot of flexibility in developer workflows. Because there is no central repository, the terms client and server don't necessarily apply. A successful Git branching model » nvie.com. In this post I present the development model that I’ve introduced for all of my projects (both at work and private) about a year ago, and which has turned out to be very successful.

A successful Git branching model » nvie.com

I’ve been meaning to write about it for a while now, but I’ve never really found the time to do so thoroughly, until now. I won’t talk about any of the projects’ details, merely about the branching strategy and release management. It focuses around Git as the tool for the versioning of all of our source code. Why git? ¶ For a thorough discussion on the pros and cons of Git compared to centralized source code control systems, see the web.

But with Git, these actions are extremely cheap and simple, and they are considered one of the core parts of your daily workflow, really. As a consequence of its simplicity and repetitive nature, branching and merging are no longer something to be afraid of. Enough about the tools, let’s head onto the development model. Decentralized but centralized ¶ The main branches ¶