The Problem
Developers spend disproportionate time translating UI actions into Git CLI commands, resolving merge conflicts, and undo‑ing accidental rewrites. The lack of a live, graph‑based view of a repository forces a manual, error‑prone workflow.
What This Does
GitUp delivers a native macOS client that reads the Git object database directly. Core logic lives under GitUpKit/Core/ – classes such as GCLiveRepository.h/.m, GCDiff.h/.m, and GCCommit.h/.m model branches, commits, and diffs without spawning external Git processes. The UI layer (GitUp/Application/…) builds on these models to provide interactive commit reordering, snapshot‑based rollbacks, and a unified reflog browser. The auxiliary command‑line tool in GitUp/Tool/ (main.m) offers the same engine for scripted use.
How It Is Wired
Entry point – launching the app executes GitUp/Application/main.m, which creates an NSApplication and instantiates AppDelegate. The delegate loads the main window (WindowController) and injects a GCLiveRepository instance pointing at the user‑selected repository path.
Core flow – UI actions (e.g., “reorder commit”) invoke methods on GCLiveRepository (found in GitUpKit/Core/GCLiveRepository+Conflicts.h/.m). Those methods call GCDiff to compute delta trees, and use GCCommitDatabase to persist new commit objects. All file‑system writes target the .git directory directly; no external git binary is invoked.
Supporting components – GCBranch, GCIndex, and GCError provide lightweight wrappers around branch refs, staging area, and error handling. Tests under GitUpKit/Core/*-Tests.m validate each core class in isolation.
Tool path – GitUp/Tool/main.m parses command‑line arguments, constructs a GCLiveRepository, and forwards sub‑commands to the same core APIs, ensuring feature parity between UI and CLI.
Wiring gaps – The static import analysis reports 0 internal modules and no import edges, meaning the codebase relies on Objective‑C header imports rather than a modular graph. No circular dependencies were detected, but deep nesting (see health section) makes control flow hard to trace.
How To Use It
# Clone the fork (preserves submodule references)
git clone --recursive https://github.com/moses-y/GitUp.git
cd GitUp
# Open the Xcode project and build
open GitUp/GitUp.xcodeproj
# In Xcode: select the “Application” target and hit Run
If you lack an Apple developer account, delete the Code Signing Identity setting in the Application target as described in the README. For CI, the repository already ships two GitHub Actions workflows (.github/workflows/build.yml and test.yml) that invoke xcodebuild on the same project.
Real‑World Use
A CI pipeline can invoke the bundled tool to enforce repository policies without checking out a separate Git binary:
./GitUp/Tool/main commit --message "ci: enforce linear history"
The command runs inside the same process that the UI uses, guaranteeing identical diff calculations and conflict‑resolution logic.
Code Health & Issues
- HIGH – Cognitive load (deep nesting) – Files
GitUpKit/Core/GCDiff.h,GitUpKit/Core/GCLiveRepository+Conflicts.h,GitUpKit/Core/GCLiveRepository.hcontain nesting depth up to 11, making the logic hard to follow. Refactor with early returns or guard clauses. - MEDIUM – Least‑privilege
GITHUB_TOKEN–.github/workflows/build.ymldeclares no permissions, granting default write access. Addpermissions: contents: read(and widen only where needed). - MEDIUM – Large binaries –
GitUpKit/Third-Party/libcrypto.xcframework/ios-arm64/libcrypto.a(≈10 MB) exceeds 5 MB; store via Git LFS or external storage to reduce clone/CI payloads. - LOW – Missing job timeouts – Both workflows lack
timeout-minutes; set a realistic bound to avoid overlapping runs.
The repo includes a full test suite (35 test files) and CI, a LICENSE file, and no committed secrets. No Dockerfile or lockfile is present.
The Bottom Line
GitUp offers a mature, native macOS Git client with a powerful internal model that bypasses the CLI, backed by a solid test suite and CI. The codebase is functional but suffers from deep nesting and oversized binary assets that hinder maintainability and CI efficiency. It is suitable for teams needing a visual, undo‑friendly Git workflow on macOS and who are comfortable working in Objective‑C and Xcode.