sourcegit-scm/sourcegit
Windows/macOS/Linux GUI client for GIT users
Healthy across the board
Permissive license, no critical CVEs, actively maintained — safe to depend on.
Has a license, tests, and CI — clean foundation to fork and modify.
Documented and popular — useful reference codebase to read through.
No critical CVEs, sane security posture — runnable as-is.
- ✓Last commit today
- ✓10 active contributors
- ✓MIT licensed
Show 3 more →Show less
- ✓CI configured
- ✓Tests present
- ⚠Concentrated ownership — top contributor handles 79% of recent commits
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Healthy" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/sourcegit-scm/sourcegit)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card (1200×630)
This card auto-renders when someone shares https://repopilot.app/r/sourcegit-scm/sourcegit on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: sourcegit-scm/sourcegit
Generated by RepoPilot · 2026-05-10 · Source
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/sourcegit-scm/sourcegit shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
🎯Verdict
GO — Healthy across the board
- Last commit today
- 10 active contributors
- MIT licensed
- CI configured
- Tests present
- ⚠ Concentrated ownership — top contributor handles 79% of recent commits
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live sourcegit-scm/sourcegit
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/sourcegit-scm/sourcegit.
What it runs against: a local clone of sourcegit-scm/sourcegit — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in sourcegit-scm/sourcegit | Confirms the artifact applies here, not a fork |
| 2 | License is still MIT | Catches relicense before you depend on it |
| 3 | Default branch master exists | Catches branch renames |
| 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 5 | Last commit ≤ 30 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of sourcegit-scm/sourcegit. If you don't
# have one yet, run these first:
#
# git clone https://github.com/sourcegit-scm/sourcegit.git
# cd sourcegit
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of sourcegit-scm/sourcegit and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "sourcegit-scm/sourcegit(\\.git)?\\b" \\
&& ok "origin remote is sourcegit-scm/sourcegit" \\
|| miss "origin remote is not sourcegit-scm/sourcegit (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
&& ok "license is MIT" \\
|| miss "license drift — was MIT at generation time"
# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
&& ok "default branch master exists" \\
|| miss "default branch master no longer exists"
# 4. Critical files exist
test -f "src/App.axaml.cs" \\
&& ok "src/App.axaml.cs" \\
|| miss "missing critical file: src/App.axaml.cs"
test -f "src/Commands/Command.cs" \\
&& ok "src/Commands/Command.cs" \\
|| miss "missing critical file: src/Commands/Command.cs"
test -f "src/App.Commands.cs" \\
&& ok "src/App.Commands.cs" \\
|| miss "missing critical file: src/App.Commands.cs"
test -f "src/Commands/QueryCommits.cs" \\
&& ok "src/Commands/QueryCommits.cs" \\
|| miss "missing critical file: src/Commands/QueryCommits.cs"
test -f "src/AI/Service.cs" \\
&& ok "src/AI/Service.cs" \\
|| miss "missing critical file: src/AI/Service.cs"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 30 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~0d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/sourcegit-scm/sourcegit"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
⚡TL;DR
SourceGit is a cross-platform desktop Git GUI client written in C# (Avalonia-based) for Windows, macOS, and Linux. It provides a visual interface for Git operations—clone, fetch, pull, push, merge, rebase, cherry-pick, interactive rebase, and advanced workflows like bisect and worktrees—plus built-in features like commit graph visualization, SSH per-remote support, Git LFS, GitFlow, AI-powered commit messages, and issue linking to GitHub/GitLab/Gitea/Gitee/Bitbucket. Monolith desktop app: src/AI/ (AI agent and chat tools), src/ contains core logic (implied structure based on typical Avalonia projects), build/resources/ holds platform-specific assets (macOS .icns/.plist, Linux .desktop/.metainfo, DEB/RPM/AppImage specs), and build/scripts/ contains packaging automation (PowerShell for Windows, shell scripts for macOS/Linux).
👥Who it's for
Git users on desktop (Windows/macOS/Linux) who prefer a GUI over CLI for repository management, branch workflows, and visual commit history—especially developers working with multiple remotes, interactive rebases, or complex merge scenarios who want to avoid CLI scripts.
🌱Maturity & risk
Actively developed and production-ready. The repo has significant GitHub stars, supports 14+ languages, ships multi-platform installers (DEB, RPM, AppImage, macOS .app, Windows MSI via build scripts in build/scripts/), and maintains CI/CD workflows (build.yml, package.yml, release.yml). Commit activity and recent releases indicate ongoing maintenance, though the single primary maintainer (implied by repo structure) is a minor risk factor.
Low risk for a mature GUI application. No high-risk dependency sprawl visible (C# ecosystem is typically well-managed), but Linux support is only tested on Debian 12 (X11 & Wayland)—portability to other distros untested. The portable-mode feature (data folder next to executable) could mask configuration issues. Monitor the single-maintainer situation for long-term sustainability.
Active areas of work
Active feature development: latest workflows show package.yml and release.yml running regularly, AI commit-message generation is integrated, multi-language localization is maintained (localization-check.yml), and platform-specific packaging is automated. Recent additions likely include UI polish, theme customization, and deeper Git command coverage.
🚀Get running
- Install Git (≥2.25.1). 2. Clone:
git clone https://github.com/sourcegit-scm/sourcegit.git. 3. OpenSourceGit.slnxin Visual Studio ordotnet buildfrom the root. 4. Run the compiled binary ordotnet runif a launch configuration exists.
Daily commands:
dotnet restore(resolve dependencies from global.json). 2.dotnet buildordotnet runfrom repo root. For platform-specific builds: Windows:build/scripts/package.win.ps1, macOS:build/scripts/package.osx-app.sh, Linux:build/scripts/package.linux.sh.
🗺️Map of the codebase
src/App.axaml.cs— Main application entry point and lifecycle management for the Avalonia GUI frameworksrc/Commands/Command.cs— Base abstraction for all Git command wrappers; every Git operation extends this classsrc/App.Commands.cs— Application command routing and orchestration layer that coordinates UI actions with Git commandssrc/Commands/QueryCommits.cs— Core commit history querying command; used extensively throughout the UI for commit display and navigationsrc/AI/Service.cs— AI integration service for commit message generation and code analysis featuressrc/App.axaml— Root XAML markup defining application-wide styles, resources, and theme management
🛠️How to make changes
Add a new Git command operation
- Create a new class in src/Commands/ that inherits from Command.cs base class (
src/Commands/Command.cs) - Implement BuildArguments() method to construct git CLI arguments and Execute() to parse command output (
src/Commands/YourCommand.cs) - Add a corresponding handler method in App.Commands.cs that instantiates and executes your command (
src/App.Commands.cs) - Wire up the command to UI events (buttons, menu items) in XAML views by binding to the handler method (
src/App.axaml.cs)
Add a new AI-powered feature
- Define a new tool in ChatTools.cs that exposes Git data to the LLM (e.g., file changes, diff context) (
src/AI/ChatTools.cs) - Add a new prompt template and LLM invocation method in Service.cs (
src/AI/Service.cs) - Create an Agent.cs method to coordinate tool calls and LLM responses for your feature (
src/AI/Agent.cs) - Integrate the AI service call into App.Commands.cs and bind UI controls to trigger the AI operation (
src/App.Commands.cs)
Add a new theme or customize UI appearance
- Define theme colors and styles in App.axaml under the Application.Styles section (
src/App.axaml) - Create theme resource dictionaries (light/dark variants) with brush and font definitions (
src/App.axaml) - Expose theme switching logic in App.axaml.cs to toggle between theme variants at runtime (
src/App.axaml.cs)
Add support for a new Git workflow or extension
- Create specialized Command classes in src/Commands/ for your workflow (e.g., GitFlow.cs pattern) (
src/Commands/GitFlow.cs) - Implement workflow-specific operations by composing multiple Git commands (
src/Commands/Command.cs) - Add orchestration methods in App.Commands.cs to manage multi-step workflow execution (
src/App.Commands.cs) - Build dedicated UI panels or dialogs in XAML to guide users through the workflow steps (
src/App.axaml)
🔧Why these technologies
- Avalonia Framework — Enables single codebase for Windows, macOS, and Linux GUI with XAML-based declarative UI and data binding
- .NET 8+ (C#) — Modern cross-platform runtime with strong type safety, async/await patterns, and native Windows/macOS/Linux support via CoreCLR
- Git CLI Invocation (subprocess) — Direct git executable wrapping provides universal compatibility (any git version) without reimplementing git internals
- LLM Integration (AI Service) — Optional GenAI layer for intelligent commit message generation, code review suggestions, and semantic search over changes
⚖️Trade-offs already made
-
Wrapping git CLI instead of using libgit2
- Why: Simplicity, compatibility across git versions, and delegating complexity to battle-tested git binary
- Consequence: Performance overhead for subprocess spawning on every operation; harder to implement real-time streaming diffs
-
Single-threaded synchronous command execution model
- Why: Sequential git commands match user intent (edit → stage → commit) and reduce concurrency bugs
- Consequence: Long-running operations (push to slow remote) block UI; mitigated by async/await wrapper calls from orchestration layer
-
Avalonia for cross-platform UI
- Why: Unified XAML codebase shares 90%+ between Windows, macOS, Linux platforms
- Consequence: Platform-specific polish requires per-OS customization; native feels less polished than native frameworks but saves development cost
-
Optional opt-in AI service (not mandatory)
- Why: Keeps core functionality independent of LLM availability and API keys
- Consequence: AI features degrade gracefully if service unavailable; requires feature flag management in App.Commands
🚫Non-goals (don't propose these)
- Does not implement Git protocol directly; relies entirely on git CLI binary for all repository operations
- Not a real-time collaborative tool; designed for local or single-user workflows
- Does not provide authentication handling beyond git credential helpers; defers to system/git configuration
- Not a Git hosting platform; cannot create repositories on GitHub/GitLab (read-only from those platforms)
🪤Traps & gotchas
Platform-specific quirks: Linux support only tested on Debian 12; other distros may fail (GTK vs Qt mismatch, Wayland vs X11 issues). Portable mode logic: Creating a data/ folder next to the executable silently switches storage location—easy to miss in docs. SSH per-remote: Each remote must be manually configured with its own SSH key; no global fallback—requires understanding of SSH config. Git version requirement (≥2.25.1): Older systems may have incompatible Git; no version check visible in startup. AI service integration: src/AI/ likely requires API keys/network—check if offline mode is supported. Build dependencies: global.json pins .NET version; mismatches cause silent build failures.
🏗️Architecture
💡Concepts to learn
- Interactive Rebase — SourceGit exposes interactive rebase (amend/reword/squash/reorder commits) as a core feature—understanding commit history rewriting is essential for reviewing changes and code archaeology.
- Worktrees — SourceGit lists worktrees as a supported feature—git worktrees allow multiple working directories from one repo, useful for parallel work on different branches without switching context.
- Cherry-pick — Cherry-pick (selectively apply commits from one branch to another) is a core SourceGit operation—differs from merge/rebase in scope and is crucial for backporting hotfixes.
- Git LFS (Large File Storage) — SourceGit supports Git LFS—essential for repos with large binaries (media, models); storing them in Git directly breaks performance, so LFS replaces them with pointers.
- Bisect — SourceGit lists git bisect as supported—binary search through commit history to find regression introduction; critical skill for debugging in large histories.
- GitFlow Workflow — SourceGit has built-in GitFlow support—GitFlow is a branching strategy (main/develop/feature/release/hotfix) widely used in larger teams; the GUI abstracts CLI complexity.
- SSH Per-Remote Authentication — SourceGit allows different SSH keys per remote (each remote configured separately)—critical for multi-account setups (work vs. personal GitHub), avoiding hardcoded global SSH config.
🔗Related repos
gitextensions/gitextensions— Windows-first .NET Git GUI with similar feature breadth (commit graph, interactive rebase, merge conflict resolution)—closest competitor in the .NET ecosystemlibgit2/libgit2— C library for Git operations—SourceGit wraps git CLI, but libgit2 is the alternative foundation many GUI clients use for lower-level controlsourcegit-scm/sourcegit-theme— Official theme repository—users customize SourceGit appearance by cloning themes from hereGitKraken/gitkraken-client— Commercial cross-platform Git GUI with AI features and visual diff—market competitor with similar UX goals but proprietarymagit/magit— Emacs-based Git interface—philosophical alternative for CLI-adjacent developers; demonstrates text-mode Git workflow paradigm SourceGit replaces with GUI
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add unit tests for src/Commands directory
The Commands directory contains critical git operation implementations (Add.cs, Branch.cs, Checkout.cs, CherryPick.cs, Clone.cs, etc.) but there are no visible test files in the repository structure. Given that these commands are the core business logic of a git client, adding unit tests would significantly improve code reliability and catch regressions. This is especially valuable for a GUI client where users depend on correct git operations.
- [ ] Create a new test project (e.g., src/Tests or tests/) following .NET conventions
- [ ] Start with unit tests for base Command.cs class to validate command execution patterns
- [ ] Add tests for high-risk commands: Checkout.cs, Merge.cs, Rebase.cs, Reset.cs to ensure data safety
- [ ] Integrate test execution into the existing CI pipeline (.github/workflows/ci.yml)
- [ ] Aim for >80% code coverage on the Commands namespace
Add AI/Agent.cs integration tests and documentation
The AI directory (src/AI/Agent.cs, Service.cs, ChatTools.cs) appears to be a significant feature but lacks visible documentation about how the AI integration works, what providers are supported, and how contributors can test it. This is a specialized feature that would benefit from clear integration test examples and a dedicated documentation file explaining the AI architecture, similar to TRANSLATION.md.
- [ ] Create docs/AI_INTEGRATION.md documenting the AI service architecture, supported providers, and configuration
- [ ] Add integration tests in src/AI/Tests/ covering Agent initialization, ChatTools functionality, and Service lifecycle
- [ ] Document API requirements and any external dependencies (OpenAI, etc.) in the AI section
- [ ] Add example configurations or environment variable setup instructions for contributors testing AI features
Implement platform-specific integration tests in CI/CD workflows
The repo has build scripts for Windows (.github/workflows/package.win.ps1), macOS (.github/workflows/package.osx-app.sh), and Linux (.github/workflows/package.linux.sh) but the existing CI workflows (ci.yml, build.yml) don't show explicit platform-specific test execution. Adding matrix testing across Windows/macOS/Linux in the CI pipeline would catch platform-specific bugs early and ensure consistency across all supported platforms.
- [ ] Extend .github/workflows/ci.yml to add matrix strategy for Windows, macOS, and Linux runners
- [ ] Create platform-specific test steps that validate GUI rendering, git command execution, and file path handling on each OS
- [ ] Reference the existing build scripts (package.win.ps1, package.osx-app.sh, package.linux.sh) as templates for platform-specific validation
- [ ] Ensure test results are reported clearly and block merges if any platform-specific tests fail
🌿Good first issues
- Add unit tests for src/AI/Agent.cs and src/AI/ChatTools.cs—currently no test files visible in the repo structure, leaving AI features without regression coverage.
- Expand Linux platform testing: document and add CI steps for Ubuntu 22.04 LTS, Fedora, and Arch Linux to reduce Debian-12-only brittleness and catch distro-specific GTK/Wayland bugs early.
- Create a troubleshooting guide in docs/ or README for common SSH key setup mistakes per remote, since SSH configuration is manual and error-prone for new users unfamiliar with .ssh/config.
⭐Top contributors
Click to expand
Top contributors
- @love-linger — 79 commits
- @github-actions[bot] — 12 commits
- @gotoh — 2 commits
- @Nietod — 1 commits
- @AquariusStar — 1 commits
📝Recent commits
Click to expand
Recent commits
57c9151— Merge branch 'release/2026.10' (love-linger)261d723— version: 2026.10 (love-linger)fbe82db— refactor: ignore hard-codedEnter/Spacekey event in AvaloniaUI'sListBoxand make it can be handled by app (love-linger)5dbb529— enhance: prevent too many selection changed events being raised while apply selection to commit list (love-linger)baf0dd0— fix: wrong commit order to compare which is introduced by commit c3cbc61637 (love-linger)2cfcd43— fix: selection lost when switch from repo to welcome page (love-linger)7bca6c9— refactor: remove binding warnings (love-linger)9c75eb9— enhance: search position forfixup!/squash!commit in reversed order (#2314) (love-linger)a9bb173— enhance: leave action topickif there's onlyfixupanddropcommits to it (#2313) (love-linger)5fbfe97— code_style: remove unnecessary code (love-linger)
🔒Security observations
- High · Command Injection Risk in Git Command Execution —
src/Commands/ directory. The codebase contains multiple Command classes (Add.cs, Commit.cs, etc.) that execute git commands. Without examining the actual implementation, there is a significant risk of command injection if user input is not properly sanitized before being passed to git operations. This is particularly critical in a Git GUI client that handles user-provided repository paths, branch names, and commit messages. Fix: Ensure all git command arguments are properly escaped and validated. Use parameterized command execution where possible rather than string concatenation. Implement strict input validation for repository paths, branch names, and file paths. - High · Potential Path Traversal Vulnerability —
src/Commands/ (all file operation commands). Git GUI applications often work with arbitrary repository paths and file operations. The codebase lacks visible path validation mechanisms. Without proper canonicalization and validation, attackers could potentially access files outside the intended repository directory using path traversal sequences like '../' or symlink attacks. Fix: Implement strict path validation using Path.GetFullPath() and verify all paths resolve within the expected repository directory. Reject paths containing '..', validate against a whitelist of allowed operations, and handle symlinks securely. - Medium · Insecure Deserialization in AI/ChatTools and AI/Service —
src/AI/ChatTools.cs, src/AI/Service.cs. The AI-related modules (AI/ChatTools.cs, AI/Service.cs) may be deserializing data from external sources (AI APIs, user input). Without visible sanitization, this could lead to arbitrary code execution or data tampering if untrusted data is deserialized. Fix: Use type-safe deserialization patterns, validate all incoming JSON/data against strict schemas, avoid using BinaryFormatter or other unsafe deserialization methods. Implement input validation and consider using JSON schema validation. - Medium · Incomplete Dependency Visibility —
Dependencies and package management files. The provided package dependency file content is empty. This means there's no visibility into the project's NuGet/package dependencies, which could hide known vulnerable packages. The project uses Avalonia UI framework and .NET which may have transitive dependencies with known vulnerabilities. Fix: Conduct a full dependency audit using 'dotnet list package --vulnerable' and tools like OWASP Dependency-Check. Keep all dependencies updated to the latest secure versions. Enable security scanning in CI/CD pipelines (e.g., GitHub Dependabot). - Medium · Potential Information Disclosure in Diff/Blame Operations —
src/Commands/Diff.cs, src/Commands/Blame.cs. Commands like Diff.cs and Blame.cs read file contents from git repositories. If error messages or stack traces are exposed to users without proper sanitization, sensitive information from file paths, git history, or system information could be disclosed. Fix: Implement generic error messages for user-facing errors. Log detailed errors securely server-side only. Sanitize all output from git commands before displaying to users. - Medium · Unvalidated Clone/Fetch Operations —
src/Commands/Clone.cs, src/Commands/Fetch.cs. The Clone.cs and Fetch.cs commands allow users to specify arbitrary Git repository URLs. Without validation, users could be tricked into cloning malicious repositories or exploiting git vulnerabilities. Additionally, MITM attacks on HTTP-based repositories are possible. Fix: Validate repository URLs using URL parsing libraries, warn users about HTTP vs HTTPS, enforce HTTPS for remote operations, verify SSH keys, and implement certificate pinning for critical repositories. Warn users before cloning from untrusted sources. - Low · Missing Security Headers in Build Configuration —
src/App.manifest, build/scripts/package.win.ps1. The Windows executable manifest (src/App.manifest) and packaging scripts lack explicit security hardening directives such as DEP (Data Execution Prevention) and ASLR (Address Space Layout Randomization) specifications. Fix: Enable DEP and ASLR in the Windows application manifest. Ensure all build scripts compile with /DYNAMICBASE and /NXCOMPAT flags. - Low · Potential Sensitive Data in Build Artifacts —
undefined. Build scripts (package.linux.sh, package.osx-app.sh, package. Fix: undefined
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.