Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitSharp vs NGit

What is the current state of GitSharp and NGit and which one is better suited for Git automation from .NET?

like image 908
serega Avatar asked May 13 '11 15:05

serega


3 Answers

  • GitSharp (at least, its Core) was a manual, line by line, port of JGit. Its development has currently been paused since August 2010. However, some products still rely on it (e.g. Git-dot-aspx).

  • NGit is an automated port of JGit. It keeps on being updated against JGit and continuously benefits from JGit improvements and bug fixes. NGit is currently used to bring Git features to MonoDevelop.

Performance wise, cloning a huge repository (Mono or Linux, for instance) with GitSharp was a long and painful experience. I haven't tried with NGit though.

Considering those facts, from a support/maintenance perspective, I would suggest you to use NGit over GitSharp.

EDIT:

GitSharp web site now states

GitSharp development is currently on hold because we believe that the libgit2 project and its C# bindings libgit2sharp are far more promising to work on.

like image 134
nulltoken Avatar answered Oct 27 '22 05:10

nulltoken


I have used GitSharp a bit, and it was good enough even a year back. I think the activity on GitSharp is reduced, but I think it is a much better implementation. I don't like that NGit is an automated port from JGit to a large extent, including some of its dependencies ( GitSharp uses SharpSSH, whereas NGit uses NSch, a port of JSch ) . That will mean there can be some sub-optimal performance and other issues, but I haven't used NGit, so I cannot back my claim.

like image 4
manojlds Avatar answered Oct 27 '22 05:10

manojlds


GitSharp is more high level, the low level part is implemented in GitSharp.Core GitSharp has .NET style, while NGit is too Javaish. Currently, commands such as Commit, Tag have not been implemented in GitSharp, while these ha ve been implemented in NGit.

Personally, I prefer GitSharp, as it provides a pure .NET implementation. NGit is semi-automatically ported with larger set of libraries (JSch, Sharpen) but it is still pure .NET. Pure .NET dlls (AnyCPU) ease deployment!!! libgit2sharp is just the wrapper for C library and we have to deploy the C library as well. Deployment for C libraries is more trouble to target many platforms and architectures (x86, x64, Windows, Linux)

like image 3
linquize Avatar answered Oct 27 '22 03:10

linquize