Tag Archives: git

Books: Now Alive

More and more great tech books are marked-up plain text stored in version control and render-able to ebook/HTML/PDF.


Turns out many ideas in this approach are recycled. Heck, Knuth released TeX in 1978.

One new-ish piece is this GitHub thing. GitHub provides a social coding service based on a popular software development power tool called git. GitHub is spreading like wildfire. Sure there’s lots of code on GitHub, but lots of other stuff too. Bike paths, home-renovation projects, and all German law! Srsly. This is just fun.

Anyone seen any novels on GitHub? Cory Doctorow, are you listening? If anyone turns out a popular novel on GitHub, it’ll be you!

See also:

Avoid trivial merges with github pull requests

I like a clean, boring git history. I prefer this:

* 6ca186e Someone set us up the commit
* f55bcf8 Initial commit

to this:

*   494c94e Merge pull request #1 from kormoc/pr_test
| * 6ca186e Someone set us up the commit
* f55bcf8 Initial commit

The latter includes 494c94e, a technically unnecessary commit. I call it a trivial merge, other folks call it a merge bubble.

By default, github will preserve trivial merges when you use the “Merge pull request” button.

If you don’t want these trivial commits in your history, you have to pull (fetch/merge) locally. When someone creates a pull request for you, github sends you a handy email with a command you can cut and paste to perform the merge locally.

You can merge this Pull Request by running

git pull https://github.com/kormoc/pulltest pr_test

Or view, comment on, or merge it at:


Recall that git pull does an implicit merge. If you merge locally and there are no conflicts, the trivial merge will be omitted.

You may miss the trivial commits because they include a reference to the pull request on github. I won’t. I might ask the patch submitter to refer to the pull request by name/link in their commit log message.

If you want to prevent anyone from pushing trivial merges, more work is required.

Update 2013-06-25

I now prefer what GitHub’s merge button does, namely: preserving the merge history for pull requests.