Versioning: Follow Conversions with Repack

In the last post, I covered the process of moving from hg to git. It was a relatively smooth conversion, but upon pushing my app to GitHub, I discovered a problem.

My 186-commit Mercurial repository had grown from a lean 12.5 megabytes to an unwieldy 300 megabytes; a staggering 2400% increase.

It’s worth mentioning Mercurial is usually tracking file deltas while Git is saving whole files, but something still felt wrong. This is a Ruby/JavaScript project, so there certainly weren’t any binary files in this repository.

Help came in the form of the generous Derek Hammer, friend of the blog and seasoned gitarist. After roughly 20 minutes of fiddling, the repack command was all that was needed to compress my new git repository down to 19.5 megabytes:

$ git repack -AdF

Possible Coined Term gitarist

Versioning: Lossless Conversion from Hg to Git

A few years ago I took a project from mercurial to git in order to put it on github. This article highlights how I solved the biggest problem I ran into along the way.

Read More

  • 1