Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Git and libgit2

Tags:

git

libgit2

I'm not sure whether I understood the difference between git and libgit2 correctly because the repository of git is different from libgit2, I mean they are not the same.

I want to know is there any difference between these two libraries or not?

like image 584
Afshin Mehrabani Avatar asked Feb 28 '14 13:02

Afshin Mehrabani


1 Answers

git is not a library, it is a command-line tool and the reference implementation for Git. libgit2 is an implementation of the Git system with a focus towards being usable inside complex applications and from many different languages.

The repositories are Git repositories, there is no difference in their format. What there might be are differences that come from tool vs library, like libgit2 not writing out sample hook files, as those are something only a particular tool would know how to deal with. Any other differences would be considered a bug.

like image 134
Carlos Martín Nieto Avatar answered Oct 20 '22 17:10

Carlos Martín Nieto