here is the sample to demo how to build libgit2 library and its bindings.