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 "[email protected]"
-
Add SSH Key - For GitHub/GitLab access
ssh-keygen -t ed25519 -C "[email protected]" 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: [email protected]
- Twitter: @gitmac
Made with โค๏ธ for the macOS developer community
โญ๏ธ Star us on GitHub โข ๐ฆ Follow on Twitter โข ๐ Read the Docs
