21

Which is the best Git library in Ruby to use?
Git, Grit, Rugged, Other?

Background: I'm the current maintainer of TicGit-ng which is a distributed offline ticket system built on git, and I've read and heard over and over again that Grit is the one I should use because it supersedes the Git gem, but there seems to be either a lack of documentation or a lack of features because myself and others have failed in trying to switch from the deprecated-but-functional Git to the newer Grit gem.

Jeff Welling
  • 1,289
  • 1
  • 9
  • 15

1 Answers1

20

It looks like both the Git and Grit gems are now deprecated and should not be used in new projects. Work has already begun on a Git library written in C, and a ruby library which interfaces with it is also in the works. This new ruby interface to the git library is called Rugged.

https://github.com/libgit2/rugged

Once completed, this should be the Git gem that is used in new projects.

Update(Nov24/2012): Grit is seeing new activity from new contributors and should not be automatically excluded from consideration. Rugged is based on the libgit2 C library, both of which are under active development. Grit is a pure ruby implementation of Git and is also seeing active development. It is my opinion that you should breifly research both at implementation time to determine which has become the best fit for your use.

Jeff Welling
  • 1,289
  • 1
  • 9
  • 15
  • 1
    Grit, https://github.com/mojombo/grit, has had recent activity and seems current. It says "This software was developed to power GitHub, and should be considered production ready. An extensive test suite is provided to verify its correctness." – Wolfram Arnold Nov 21 '12 at 07:16
  • 2
    **Grit is no longer maintained. Check out libgit2/rugged.** -- Grit README.md – Blake Erickson Apr 04 '14 at 11:38
  • choose wisely that integrates well with current ruby version .i.e 2.0 may be 1.9.3 – igauravsehrawat Jul 27 '14 at 07:42