How weiningwei/sourcegit works
SourceGit is a cross-platform Git GUI. The principal workflow is opening a repository, viewing its state and history, then invoking Git operations through the interface and inspecting the result. The README also documents dedicated capabilities for diffs and file history, collaboration, repository organization, Git LFS, and AI-assisted commit messages. The graph uses the tree and sampled code; links within unsampled feature areas are included only where the README or sampled call sites support them.
Main entry points: Command.cs Git command layer · Repository.cs Repository workspace · Launcher.cs Repository launcher · WorkingCopy.cs Working copy
Components 23
Desktop interface
- Application entry
src/App.axaml.cs - Repository launcher
src/ViewModels/Launcher.cs - Repository workspace
src/ViewModels/Repository.cs - Repository view
src/Views/Repository.axaml.cs - Working copy
src/ViewModels/WorkingCopy.cs
Git operations
- Git command layer
src/Commands/Command.cs - Status query
src/Commands/QueryRepositoryStatus.cs - Change query
src/Commands/QueryLocalChanges.cs - Repository models
src/Models/RepositoryStatus.cs
Repository features
- Commit history
src/ViewModels/Histories.cs - Diff and compare
src/ViewModels/Compare.cs - File history
src/ViewModels/FileHistories.cs - File blame
src/ViewModels/Blame.cs - Commit workflow
src/ViewModels/WorkingCopy.cs - GitFlow
src/ViewModels/GitFlowStart.cs - Workspace management
src/ViewModels/Workspace.cs - Custom actions
src/ViewModels/ExecuteCustomAction.cs - Git LFS
src/ViewModels/LFSFetch.cs - AI commit assistant
src/ViewModels/AIAssistant.cs
External integrations
- Git repository
- Compatible AI API
- Git remotes
Other components
- User
Connections 23
- User → Application entry: launches
- Application entry → Repository launcher: opens
- User → Repository launcher: selects repository
- Repository launcher → Repository workspace: opens
- Repository workspace → Repository view: presents
- Repository workspace → Git command layer: runs operations
- Working copy → Git command layer: runs operations
- Commit history → Git command layer: queries history
- Diff and compare → Git command layer: queries revisions
- File history → Git command layer: queries history
- File blame → Git command layer: queries blame
- GitFlow → Git command layer: runs GitFlow
- Git LFS → Git command layer: runs LFS
- Custom actions → Git command layer: runs actions
- Git command layer → Git repository: invokes Git
- Repository workspace → Status query: queries status
- Working copy → Change query: queries changes
- Status query → Repository models: returns status
- Change query → Repository models: returns changes
- Git command layer → Git remotes: accesses remotes
- AI commit assistant → Compatible AI API: requests messages
- AI commit assistant → Git command layer: uses commit context
- Workspace management → Repository workspace: organizes repositories