libgit2: a Git Linkable Library
One of the long running issues with Git is that the library produced to run the binary is not re-entrant – you can’t link to it from another program because…
One of the long running issues with Git is that the library produced to run the binary is not re-entrant – you can’t link to it from another program because it calls die() all over the place. Thus, anyone trying to write a GUI or web interface or script for Git has always had to fork/exec a call to the actual Git binary, which is slow and often a poor API (having to parse the text output).
A few years ago Shawn Pearce started a new Git library designed and licensed to be linkable and called it libgit2. This was a great idea, but nobody really ran with it and not much was done on it for several years. Fortunately this year a student choose it for their Google Summer of Code project and for better or worse got me as their mentor.
Well, that student did an amazing job taking the library from being basically unusable to being incredibly useful. His name is Vicent Marti and GitHub has taken over where the GSoC organization left off and has contracted Vicent to continue his great work on libgit2 and its Ruby bindings, the Rugged library.
The projects are still in a bit of flux, but there is quite a lot you can do now and there are bindings for Python in addition to Ruby. If you are interested in using it for something and have any features you would like to see, add an issue to our GitHub project. You can read more about libgit2 at its new website: libgit2.github.com.

A little about Vicent: Vicent Marti is a 20 year old developer born and raised in the Catalan Countries. He is currently working towards his Masters Degree in Computer Science while living in Helsinki (Finland) and trying to cope with the fact that water comes in shapes and forms other than “liquid; in the Mediterranean”. When he’s not working on anything related to indie videogames, he enjoys evangelizing about Git and being an asshole about it.
Written by
Related posts
Changes to GitHub Copilot Individual plans
We’re making these changes to ensure a reliable and predictable experience for existing customers.
Bringing more transparency to GitHub’s status page
Changes to the status page will provide more specific data, so you’ll have better insight into the overall health of the platform.
Developer policy update: Intermediary liability, copyright, and transparency
We’re sharing recent policy updates that developers should know about, updating our Transparency Center with the full year of 2025 data, and looking to what’s ahead.