A look at libgit2/objective-git: 1.2k stars on GitHub, written primarily in Objective-C. Objective-C bindings to libgit2
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Not all libgit2 features are available, but if you run across something missing, please consider contributing a pull request!
Many classes in the ObjectiveGit API wrap a C struct from libgit2 and expose the underlying data and operations using Cocoa idioms. The underlying libgit2 types are prefixed with git_ and are often accessible via a property so that your application can take advantage of the libgit2 API directly.
The ObjectiveGit API makes extensive use of the Cocoa NSError pattern. The public API is also decorated with nullability attributes so that you will get compile-time feedback of whether nil is allowed or not. This also makes the framework much nicer to use in Swift.
Getting Started
Xcode
ObjectiveGit requires Xcode 7 or greater to build the framework and run unit tests. Projects that must use an older version of Xcode can use
Carthage to install pre-built binaries
or download them manually.
Other Tools
Simply run the script/bootstrap script to automatically install
dependencies needed to start building the framework. This script uses
Homebrew to install these tools. If your Mac does not have
Homebrew, you will need to install the following manually:
To develop ObjectiveGit on its own, open the ObjectiveGitFramework.xcworkspace file.
Installation
There are three ways of including ObjectiveGit in a project:
Carthage <-- recommended
Manual
Subproject
Carthage
Add ObjectiveGit to your Cartfile.
github "libgit2/objective-git"
Run carthage update.
Mac targets
On your application targets' "General" settings tab, in the "Embedded Binaries" section, drag and drop the ObjectiveGit.framework from the Carthage/Build/Mac folder on disk.
iOS targets
On your application targets' "General" settings tab, in the "Linked Frameworks and Libraries" section, drag and drop the ObjectiveGit.framework from the Carthage/Build/iOS folder on disk.
On your application targets' "Build Phases" settings tab, click the “+” icon and choose “New Run Script Phase”. Create a Run Script with the following contents:
/usr/local/bin/carthage copy-frameworks
and add the paths to the frameworks you want to use under “Input Files”, e.g.:
Under “Build Settings”, add the following to “Header Search Paths”: $(SRCROOT)/Carthage/Build/iOS/ObjectiveGit.framework/Headers/ to avoid git2/filter.h file not found errors.
The different instructions for iOS works around an App Store submission bug triggered by universal binaries.
Copying debug symbols for debugging and crash reporting
dSYM files are not currently included in the GitHub release zip files. You will need to pass --no-use-binaries to carthage in order to build locally and generate the dSYM files alongside the framework.
On your application target's "Build Phases" settings tab, click the "+" icon and choose "New Copy Files Phase".
Click the “Destination” drop-down menu and select "Products Directory".
Drag and drop the ObjectiveGit.framework.dSYM file from Carthage/Build/[platform] into the list.
Manual
Download the latest ObjectiveGit.framework.zip from releases.
Unzip the file.
Follow the Carthage instructions #3 or #4, depending on platform.
Note that the iOS framework we release is a "fat" framework containing slices for both the iOS Simulator and devices. This makes it easy to get started with your iOS project. However, Apple does not currently allow apps containing frameworks with simulator slices to be submitted to the app store. Carthage (above) already has a solution for this. If you're looking to roll your own, take a look at Realm's strip frameworks script.
Drag the ObjectiveGitFramework.xcodeproj file into the Project Navigator pane of your project.
Add ObjectiveGit-Mac or ObjectiveGit-iOS as a target dependency of your application, depending on platform.
Link your application with ObjectiveGit.framework.
Set the “Header Search Paths” (HEADER_SEARCH_PATHS) build setting to the correct path for the libgit2 headers in your project. For example, if you added the submodule to your project as External/ObjectiveGit, you would set this build setting to External/ObjectiveGit/External/libgit2/include. If you see build errors saying that git2/filter.h cannot be found, then double-check that you set this setting correctly.
Add a new "Copy Files" build phase, set the destination to "Frameworks" and add ObjectiveGit.framework to the list. This will package the framework with your application as an embedded private framework.
It's hard to tell the difference between the platforms, but the Mac framework is in build/Debug whereas the iOS framework is in build/Debug-iphoneos
Don't forget to #import <ObjectiveGit/ObjectiveGit.h> or @import ObjectiveGit; as you would with any other framework.
Contributing
Fork this repository
Make it awesomer (preferably in a branch named for the topic)
Send a pull request
All contributions should match GitHub's Objective-C coding
conventions.
You can see all the amazing people that have contributed to this project
here.
License
ObjectiveGit is released under the MIT license. See
the LICENSE file.
Does libgit2/objective-git have a project website?
No homepage URL was recorded for libgit2/objective-git in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How many stars does libgit2/objective-git have?
libgit2/objective-git has 1.2k GitHub stars — refresh the page for the live number, or check github.com/libgit2/objective-git. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is libgit2/objective-git open source?
Yes — libgit2/objective-git ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/libgit2/objective-git.
What is libgit2/objective-git?
libgit2/objective-git (libgit2/objective-git) is a Objective-C project on GitHub. From the project's own README: Objective-C bindings to libgit2
Where do I read more about libgit2/objective-git?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/libgit2/objective-git is the definitive source.
Read full README in the tab above.
Curious whether objective-git is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about objective-git.