mojombo/grit ↗
Created Jan 2, 2021 · View the mojombo/grit repository page
**Grit is no longer maintained. Check out libgit2/rugged.** Grit gives you object oriented read/write access to Git repositories via Ruby.
Want this for your repo?
Render a free sample of any GitHub repo in seconds.
Contributors
47
Lines of Code
2,551
From
Oct 10, 2007
To
Jan 28, 2014
About mojombo/grit
Grit is a Ruby library that provides object-oriented read and write access to Git repositories. Originally developed to power GitHub, it combines two approaches for interacting with Git data: some operations shell out to the system's git command while others use pure Ruby implementations of Git functionality. This hybrid approach is transparent to users and was designed to prioritize both stability and performance.
The library allows developers to work with Git repositories programmatically through Ruby objects like Repo, Commit, Tree, and Blob. Users can initialize a Repo object pointing to a Git repository, then traverse its structure to access commits, browse commit history with filtering and pagination, inspect commit metadata like author and message, navigate directory trees, and read file contents. The library includes an extensive test suite and was production-ready for GitHub's use at scale.
Note that Grit is no longer actively maintained, with the project recommending users migrate to Rugged (a binding to libgit2) for new projects.