You can take a look at the initial version of ometastore here: http://eigenclass.org/repos/gitweb?p=gibak.git;a=blob;f=omet... The functionality from metastore takes ~270 lines vs. ~1500 lines of C, the support for .gitignore takes another 70locs.
It's got one or two bugs in the Gitignore support which I fixed later (and a silly bug in do_finally), but this code is simpler if you want to see what OCaml looks like in actual use (for a system tool, in this case). It's almost (if not actually, I don't remember) the "first version that typed", by the way.