A modern, native macOS Git client built with SwiftUI
Features • Installation • Architecture • Usage • Contributing
GitMac is a powerful, native macOS Git client designed to provide an exceptional developer experience. Built entirely with SwiftUI and leveraging native macOS technologies, GitMac offers blazing-fast performance, beautiful UI, and advanced Git features that streamline your development workflow.
- 🚀 Native Performance - Built with Swift and SwiftUI for optimal macOS performance
- 🎨 Modern UI - Clean, intuitive interface following Apple's Human Interface Guidelines
- ⚡️ Fast - Instant repository switching, real-time diff viewing, and lightning-fast operations
- 🔧 Advanced Features - Line-level staging, interactive rebase, AI-powered suggestions
- 🎯 Developer-First - Keyboard shortcuts, customizable themes, and workflow automation
- 🔒 Secure - Keychain integration, GPG signing support, and secure credential management
- ✅ Repository Management - Clone, initialize, and manage multiple repositories
- ✅ Branch Operations - Create, merge, rebase, and delete branches with drag-and-drop support
- ✅ Commit History - Beautiful commit graph with filtering and search
- ✅ Staging - Stage entire files, hunks, or individual lines
- ✅ Diff Viewing - Inline, split, and unified diff views with syntax highlighting
- ✅ Stash Management - Save, apply, and manage stashes effortlessly
- 🤖 AI-Powered Features - Commit message generation, code review suggestions
- 🎯 Smart Merge - Intelligent conflict resolution with visual merge tools
- 📊 Git Flow - Built-in Git Flow and custom workflow support
- 🔍 Advanced Search - Search commits, files, and content across history
- 🏷️ Tag Management - Create, push, and manage tags with ease
- 🌐 Remote Management - Configure and manage multiple remotes
- ⚡️ Custom Workflows - Scriptable automation for Git operations
- 🧩 Plugin System - Extend functionality with custom plugins
- 🔧 Git Hooks UI - Visual management of Git hooks
- 👥 Team Features - Shared settings, templates, and conventions
- 🌲 Worktree Support - Multiple working trees management
- 📦 Submodules & LFS - Full support for submodules and large files
- GitHub - Issues, pull requests, and actions integration
- GitLab - Merge requests and CI/CD pipeline viewing
- Jira - Link commits to Jira issues
- Linear - Issue tracking integration
- Notion - Documentation and task management
- macOS 14.0 (Sonoma) or later
- Xcode 15.0 or later (for building from source)
- Git 2.30.0 or later
- Download the latest release from Releases
- Move
GitMac.appto your/Applicationsfolder - Launch GitMac and grant necessary permissions
# Clone the repository
git clone https://github.com/mherrera53/GitMac.git
cd GitMac
# Setup external frameworks
./scripts/setup-ghostty.sh
# Open in Xcode
open GitMac.xcodeproj
# Build and run (⌘+R)# Clone and build
git clone https://github.com/mherrera53/GitMac.git
cd GitMac
swift build -c release
# Run
.build/release/GitMac-
Configure Git - Set your name and email
git config --global user.name "Your Name" git config --global user.email "your.email@example.com"
-
Add SSH Key - For GitHub/GitLab access
ssh-keygen -t ed25519 -C "your.email@example.com" cat ~/.ssh/id_ed25519.pub | pbcopy
-
Launch GitMac - Open a repository or clone a new one
graph TB
A[GitMac App] --> B[UI Layer - SwiftUI]
A --> C[Core Services]
A --> D[Features]
B --> B1[Components]
B --> B2[Views]
B --> B3[Themes]
C --> C1[GitEngine]
C --> C2[GitService]
C --> C3[FileWatcher]
D --> D1[Branches]
D --> D2[Commits]
D --> D3[Diff]
D --> D4[Staging]
D --> D5[Terminal]
C1 --> E[Git CLI]
C2 --> F[libgit2]
D5 --> G[Ghostty Terminal]
style A fill:#667AFF,color:#fff
style B fill:#4CAF50,color:#fff
style C fill:#FF9800,color:#fff
style D fill:#2196F3,color:#fff
sequenceDiagram
participant U as User
participant UI as SwiftUI View
participant VM as ViewModel
participant GE as GitEngine
participant Git as Git CLI
U->>UI: Select Repository
UI->>VM: Load Repository
VM->>GE: Get Repository State
GE->>Git: Execute git commands
Git-->>GE: Return output
GE-->>VM: Parse & Return Data
VM-->>UI: Update State
UI-->>U: Display Changes
graph LR
A[App Entry] --> B[ContentView]
B --> C[MainLayout]
C --> D[Left Sidebar]
C --> E[Center Panel]
C --> F[Right Panel]
D --> D1[Repo List]
D --> D2[Branches]
D --> D3[Tags]
E --> E1[Commit Graph]
E --> E2[File Tree]
E --> E3[Staging Area]
F --> F1[Diff View]
F --> F2[Commit Details]
F --> F3[Terminal]
style A fill:#667AFF,color:#fff
style C fill:#4CAF50,color:#fff
GitMac/
├── 📁 App/
│ ├── GitMacApp.swift # App entry point
│ ├── ContentView.swift # Main app layout
│ └── AppState.swift # Global app state
│
├── 📁 Core/
│ ├── 📁 Git/
│ │ ├── GitEngine.swift # Git operations actor
│ │ ├── GitService.swift # High-level Git service
│ │ ├── PatchManipulator.swift # Line-level staging
│ │ └── DiffParser.swift # Diff parsing utilities
│ │
│ ├── 📁 Services/
│ │ ├── FileWatcher.swift # File system monitoring
│ │ ├── KeychainService.swift # Credential management
│ │ └── NotificationManager.swift
│ │
│ └── 📁 Models/
│ ├── Repository.swift
│ ├── Branch.swift
│ ├── Commit.swift
│ └── FileStatus.swift
│
├── 📁 Features/
│ ├── 📁 Branches/
│ │ ├── BranchListView.swift
│ │ └── BranchViewModel.swift
│ │
│ ├── 📁 Commits/
│ │ ├── CommitGraphView.swift
│ │ └── CommitDetailView.swift
│ │
│ ├── 📁 Diff/
│ │ ├── DiffView.swift
│ │ ├── InlineDiffView.swift
│ │ └── SplitDiffView.swift
│ │
│ ├── 📁 Staging/
│ │ └── StagingAreaView.swift
│ │
│ ├── 📁 Terminal/
│ │ ├── GhosttyDirect.swift
│ │ └── TerminalView.swift
│ │
│ └── 📁 Integrations/
│ ├── GitHub/
│ ├── GitLab/
│ ├── Jira/
│ └── Linear/
│
├── 📁 UI/
│ ├── 📁 Components/
│ │ ├── AppTheme.swift # App-wide theme
│ │ ├── 📁 Buttons/
│ │ ├── 📁 Icons/
│ │ ├── 📁 Rows/
│ │ └── 📁 Layout/
│ │
│ └── 📁 Utilities/
│ ├── Extensions.swift
│ └── Constants.swift
│
└── 📁 Resources/
├── Assets.xcassets
└── Info.plist
The heart of GitMac's Git operations. Uses Swift actors for thread-safe, concurrent Git command execution.
actor GitEngine {
func status(at path: String) async throws -> [FileStatus]
func commit(message: String, at path: String) async throws
func branches(at path: String) async throws -> [Branch]
}Centralized theme management with support for light/dark modes and custom color schemes.
enum AppTheme {
static let accent: Color
static let background: Color
static let textPrimary: Color
// ... more theme colors
}// Via File Menu
File → Open Repository → Select folder
// Via Keyboard
⌘ + O → Select repository// Stage entire file
Click on file → Click "Stage" button
// Stage specific lines
Select lines in diff → Right-click → "Stage Selected Lines"
// Unstage
Click staged file → Click "Unstage" button// Write commit message
Type message in commit area
// Commit
⌘ + Enter or Click "Commit" button
// Amend last commit
Hold ⌥ (Option) + Click "Commit"// Push to remote
Click "Push" button or ⌘ + P
// Force push (with lease)
Hold ⌘ + Shift + Pgraph LR
A[Select commits] --> B[Right-click]
B --> C[Interactive Rebase]
C --> D[Reorder/Squash/Edit]
D --> E[Apply Changes]
style C fill:#667AFF,color:#fff
graph TB
A[Drag branch] --> B{Drop on?}
B -->|Another branch| C[Merge]
B -->|Commit| D[Rebase]
B -->|Remote| E[Push]
style A fill:#4CAF50,color:#fff
style C fill:#FF9800,color:#fff
style D fill:#FF9800,color:#fff
style E fill:#2196F3,color:#fff
| Action | Shortcut |
|---|---|
| Open Repository | ⌘ + O |
| New Repository | ⌘ + N |
| Commit | ⌘ + Enter |
| Push | ⌘ + P |
| Pull | ⌘ + Shift + P |
| Refresh | ⌘ + R |
| Show Terminal | ⌘ + T |
| Search Commits | ⌘ + F |
| Switch Repository | ⌘ + 1-9 |
| Stage All | ⌘ + A |
GitMac stores configuration in:
- App Settings:
~/Library/Preferences/com.gitmac.app.plist - Repositories:
~/Library/Application Support/GitMac/repositories.json - Credentials: macOS Keychain
Create custom themes by modifying AppTheme.swift:
enum AppTheme {
// Your custom colors
static let accent = Color(hex: "667AFF")
static let background = Color(hex: "1E1E1E")
}Configure the integrated terminal in Settings:
- Font family and size
- Color scheme
- AI suggestions (enable/disable)
- Shell preference
First-time setup (required for external frameworks):
# Setup external frameworks (creates stub framework for Ghostty)
./scripts/setup-ghostty.shThen build the project:
# Debug build
xcodebuild -scheme GitMac -configuration Debug
# Release build
xcodebuild -scheme GitMac -configuration Release
# Run tests
xcodebuild -scheme GitMac testNote: The Ghostty terminal framework is optional. The setup script creates a minimal stub that allows compilation. For full Ghostty terminal functionality, see Frameworks/README.md.
GitMac follows Swift best practices:
- SwiftLint for code linting
- Async/await for concurrency
- Actors for thread safety
- MVVM architecture pattern
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
graph TB
A[GitMac] --> B[SwiftUI]
A --> C[Swift 5.9+]
A --> D[Git CLI]
A --> E[External Frameworks]
B --> B1[Native macOS Components]
B --> B2[AppKit Integration]
E --> E1[KeychainAccess]
E --> E2[Splash - Syntax Highlighting]
E --> E3[Ghostty - Terminal]
style A fill:#667AFF,color:#fff
style B fill:#4CAF50,color:#fff
style C fill:#FF9800,color:#fff
- KeychainAccess - Secure credential storage
- Splash - Syntax highlighting for diffs
- Ghostty (Optional) - Advanced terminal emulation
All major features have been implemented! GitMac now includes:
- Git LFS Support - Large file storage integration with visual management
- Submodule Management - Complete visual submodule operations
- Worktree Support - Multiple working trees with full UI
- Custom Workflows - Scriptable automation with bash scripts
- Team Features - Shared settings, templates, and team profiles
- Plugin System - Fully extensible plugin architecture
- Advanced Merge Conflict Resolution - Visual 3-way merge editor
- Git Hooks Management UI - Complete hooks management interface
- Performance Profiling - OSSignpost instrumentation throughout
Create and automate your Git operations with custom scripts:
- Pre/post commit hooks
- Custom commands
- Event-based triggers
- Import/export workflows
- 6 pre-built workflow templates
Collaborate better with team profiles:
- Shared settings and conventions
- Commit message templates
- Branch naming strategies
- Git Flow, GitHub Flow, Trunk-Based
- PR and issue templates
Extend GitMac with custom plugins:
- Custom commands and panels
- Event hooks (commits, pushes, etc.)
- Built-in plugin examples
- Import/export plugins
- Scriptable plugin architecture
- Cloud sync for workflows and settings
- Advanced code review tools
- Real-time collaboration features
- More AI integrations
- Enhanced performance analytics
GitMac is optimized for speed and efficiency:
| Operation | Time (avg) | vs. Git CLI |
|---|---|---|
| Repository Load | 50ms | ~1x |
| Diff Calculation | 100ms | ~2x |
| Stage/Unstage | 20ms | ~1x |
| Commit | 30ms | ~1x |
| Branch Switch | 80ms | ~1.5x |
Benchmarks performed on a MacBook Pro M1 with a 10,000 commit repository
Q: GitMac won't open repositories
# Check Git installation
git --version
# Verify repository
cd /path/to/repo && git statusQ: Slow performance
# Clean up repository
git gc --aggressive
# Reduce file watching scope in SettingsQ: Credentials not saving
# Reset keychain access
Preferences → Security → Reset CredentialsMIT License - see LICENSE for details
- Apple - For SwiftUI and macOS frameworks
- Git - For the amazing version control system
- Open Source Community - For inspiration and contributions
If you find GitMac useful, consider supporting its development:
Your support helps maintain and improve GitMac!
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@gitmac.app
- Twitter: @gitmac
Made with ❤️ for the macOS developer community
⭐️ Star us on GitHub • 🐦 Follow on Twitter • 📖 Read the Docs
