How adoin/git-agent works
Git Agent is a native desktop Git client. Users open or create a repository, review and stage changes, commit, then manage branches/remotes or inspect history and diffs; conflicts can be resolved in a dedicated editor, optionally with AI suggestions. The graph captures the documented product areas and the available module boundaries. Most implementation files were not sampled, so edges between the main UI and those subsystems reflect documented responsibilities rather than verified call sites; uncertain internal wiring is omitted.
Main entry points: app.rs Main application · git.rs Git operations · merge_tool.rs Three-way merge editor · git-agent-diff.rs Diff tool entry
Components 19
Desktop experience
- Main application
src/app.rs - Diff tool entry
src/bin/git-agent-diff.rs - Merge tool entry
src/bin/git-agent-merge.rs
Git workflows
- Git operations
src/git.rs - Worktree changes
src/git.rs - Ignore rules
src/gitignore.rs
Review and resolution
- History graph
src/graph.rs - Diff window
src/diff_tool.rs - Patch workflows
src/patch.rs - Three-way merge editor
src/merge_tool.rs
Assistance and customization
- AI commit messages
src/commit_ai.rs - Syntax highlighting
src/syntax.rs - Appearance settings
src/theme.rs - Localization
src/i18n.rs - Diagnostics
src/diagnostics.rs
Other components
- Git user
- System Git
- Model provider
- OS credential store
Connections 19
- Git user → Main application: uses
- Main application → Git operations: requests Git actions
- Git operations → System Git: runs commands
- Git operations → Worktree changes: loads change status
- Main application → History graph: shows history
- Main application → Diff tool entry: opens diff tool
- Diff tool entry → Diff window: starts
- Main application → Patch workflows: handles patches
- Main application → Merge tool entry: opens merge tool
- Merge tool entry → Three-way merge editor: starts
- Main application → AI commit messages: requests message
- AI commit messages → Model provider: sends context
- Main application → Ignore rules: edits ignore rules
- Main application → Syntax highlighting: uses highlighting
- Main application → Appearance settings: uses preferences
- Main application → Localization: gets translations
- Main application → Diagnostics: records events
- Three-way merge editor → Model provider: requests suggestions
- Three-way merge editor → OS credential store: uses saved credentials