Geef is an example of an Erlang NIF binding to libgit2. A bit out of date, but basically works. Best as a proof of concept of what you could do with Erlang and NIFs with libgit2.