ezyang’s blog

the arc of software bends towards understanding

Git

How to maintain a pristine copy of your configuration files

etckeeper is a pretty good tool for keeping your /etc under version control, but one thing that it won’t tell you is what the diff between your configuration and a pristine version of your configuration (if you installed the same packages on the system, but didn’t change any configuration). People have wanted this, but I […]

  • January 20, 2014

Synthetic Git merges

In theory, Git supports custom, low-level merge drivers with the merge configuration properties. In practice, no one actually wants to write their own merge driver from scratch. Well, for many cases where a custom merge driver would come in handy, you don’t have to write your merge driver from scratch! Consider these cases: You want […]

  • July 18, 2011

GHC migrating to Git

From cvs-ghc@haskell.org: Hi all, We now plan to do the git switchover this Thursday, 31 March. Thanks Ian There are some things that I will miss from Darcs (darcs send and the cases where "everything is a patch" actually does work well), but all and all I’m quite pleased to see GHC moving to Git.

  • March 30, 2011

Tension of patch and tree version control

This post is not meant as a rag on Darcs, just a observation of the difference between two philosophies of version control. Also, I’m a bit new to Darcs, so there might be some factual inaccuracies. Please let me know about them! At some point, I would like to write a Darcs for Git users […]

  • September 20, 2010

Bug boogie: Git and symlinks

Git is very careful about your files: unless you tell it to be explicitly destructive, it will refuse to write over files that it doesn't know about, instead giving an error like: Untracked working tree file 'foobar' would be overwritten by merge. In my work with Wizard, I frequently need to perform merges on working […]

  • June 2, 2010

History as documentation

It's real easy to argue about the utility, style and implementation of source code comments, those good ole' pals of code that try to add supplementary information when the pure code isn't enough. However, to focus solely on the latest snapshot of any particular source file is to miss a wealth of information that is […]

  • February 26, 2010

Workflows in Git: Single-user style

Nelson Elhage wrote a post about Git and usability, in which he discussed one of the reasons why Git seems to be so confusing to users who have come in straight from a Subversion-style workflow. When discussing this issue offline, one of the things that came up was the fact that, while Subversion imposes a […]

  • January 29, 2010

Hacking git-rerere

An unusual workflow for Git, one that Wizard employs extensively, is when a single developer needs to perform merges inside lots of working copies. Normally, a maintainer would pull from the branches he cared about, and offload a large amount of the work to those who were interested in contributing patches. However, Wizard is using […]

  • January 22, 2010

Five advanced Git merge techniques

Have you ever performed a merge in Git and not have it quite turn out the way you wanted it to? For example, you accidentally converted all of your UNIX line endings to DOS line endings, and now the entire file reports a conflict? Maybe you see a conflict that you don't really care about […]

  • January 18, 2010