I've been working on a set of git tools for Mozilla, and I'm pleased to announce them to the community at large. These tools let you easily:

Have a look at the readme for usage instructions, and of course please file bugs (or send pull requests) if you encounter any problems.


Why bother?

Git is rather unpopular at Mozilla, so perhaps some justification is in order. Why bother using git at all?

I decided to try using git a few months ago, because B2G uses a git clone of mozilla-central, and using both git and hg was painful. I based my workflow on bholley's.

Although I didn't enjoy learning git, I've come to enjoy using it for hacking on Firefox. I particularly like the fact that git branches, unlike mq patches, are attached to a base revision.

With hg, I'd often end up in a situation where I hack on patch A, qpop it, work on some other stuff, update my tree, then try to push patch A again. At this point, I'd often get conflicts, which I'd have to resolve by hand. (Otherwise, I could try to find an old revision atop which the patch applied cleanly, then hg rebase my way to victory.)

This problem simply does not exist with git—I rebase my branches only when I intend to.

Also, git rebase --whitespace=fix is kind of awesome.

The learning curve is a definite downside—git's UI is awful—but now that I'm up to speed, I have no intention of switching back to hg.