opensource-git
v1.1.4
Published
A free, open-source Git GUI — commit graph, stashes, branch management, and a visual merge conflict editor. Works with local repos, GitHub, and self-hosted GitLab.
Readme
Opensource Git
A free, open-source Git GUI — commit graph, stashes, branch
management with full right-click context menus, and a visual merge conflict editor.
Built with Electron + React + TypeScript for Windows and macOS.
(opensource-git is the project/package name; the app window is titled Opensource Git.)
Works with local repositories, GitHub (github.com & Enterprise) and GitLab (gitlab.com & self-hosted) over HTTPS with personal access tokens — or any remote your system git can already reach (SSH keys, credentials already stored in your credential manager, …). All remote operations run strictly non-interactively: the app never lets git pop up an external login dialog — an unauthenticated remote is flagged in the UI instead.
Features
- Commit graph — colored branch lanes, merge curves that attach to the node's side, avatar nodes, an inline WIP row with a commit-message input, and stash nodes rendered right in the tree (they survive rebases — the dangling chain stays visible until the stash is dropped). Commit bodies preview next to the subject. Virtualized with infinite scroll — the initial (and per-page) commit count is configurable in Settings — and the BRANCH/TAG and GRAPH columns are drag-resizable.
- Stashes — create (with message / untracked toggle), apply, pop, drop and rename from the toolbar, the left panel, or the graph itself. Stash contents are browsable with per-file diffs, including untracked files.
- Branch management — checkout on double-click, create/rename/delete (with force-delete flow for unmerged branches), merge, rebase (with a per-commit conflict flow showing "commit N of M"), reset (soft/mixed/hard), push/pull/fetch with upstream auto-setup and a pull / force-push banner on rejected pushes, remote branch checkout & deletion, remote add/remove, tags, cherry-pick, revert.
- Right-click everything — commits, local branches, remote branches, tags, stashes, remotes, the WIP row, files, folders and diff lines all have context menus (folder menus stage/unstage/discard everything below them).
- Multi-select commits — Ctrl/Cmd-click toggles, Shift-click extends a range. Two selected commits show the diff between them, three or more a merged diff, and the right-click menu offers Squash and Drop commit(s) — both undoable, with conflicts flowing into the normal rebase continue/abort UI.
- Worktrees — linked worktrees are listed in the left panel and any with uncommitted changes get their own WIP row in the graph: type a commit message, stage/unstage files and commit to the worktree without leaving the main repository.
- Merge conflict editor — conflicted files open in a three-pane tool: current branch (A) and incoming branch (B) side-by-side with per-section checkboxes (pick A, B, or both), a live Output pane, conflict navigation, and one-click resolution for modify/delete and binary conflicts. Merge, rebase, cherry-pick, revert and stash-pop conflicts all supported, with Continue / Abort flows.
- Diffs & editing — Hunk, Inline (whole file) and Split views. Line-level staging: drag lines and right-click, or use the per-line +/− icon, to stage / unstage / discard exact lines (works in all three views). Hunk view keeps per-hunk buttons on top of that. File View shows the whole file with line numbers and lets you edit & save working-tree files (Ctrl+S).
- Commit panel — fixed-height dark staged/unstaged boxes with hover Stage/Unstage buttons, amend (restores your draft when unchecked), summary + description fields, and a commit signature (name/email) configurable in Settings.
- Undo/Redo for almost everything — commit, amend, reword, checkout, branch/tag create/delete/rename, merge, rebase, cherry-pick, revert, pull, stash save/apply/pop/drop/rename, reset, remote add/remove. Local-only semantics: pushes are never undone. Conflicted operations become undoable the moment they complete.
- Git Logs panel — a toggleable, resizable bottom panel streaming every git command the app actually runs (with duration and errors).
- Token-based auth, no surprise popups — every fetch/pull/push/clone runs
with your saved personal-access-token profiles and
credential.interactive=false, so git can never interrupt you with an external credential-manager login window (stored system credentials still work silently). When a remote rejects authentication, the repo tab and the remote row show a red ✕, and the credential setup screen opens automatically — once per repo per app run; dismiss it and it stays away until the next launch. - Quality of life — repo/branch dropdowns in the toolbar, resizable
left/right/bottom panels and graph columns, repo tabs restored on launch
(config lives in
~/.opensource-git/), ref filtering, branch folders (feature/…), ahead/behind badges, auto-fetch that skips refreshes when nothing changed, file-system watcher, toast notifications with progress, English/Korean UI, dark & light themes.
Requirements
- git ≥ 2.30 on your
PATH(Opensource Git drives your system git — your existing credentials, SSH keys and credential manager keep working) - Node.js ≥ 18 (build/run from source)
Run from source
git clone <this-repo>
cd opensource-git
npm install
npm start # builds main + renderer, launches the appInstall from npm
Once a release is published to npm (see below), you can install and run it anywhere — Windows, macOS or Linux:
npm install -g electron opensource-git # electron is the runtime, opensource-git is the app
opensource-git # launches the GUIelectron is the package's only runtime dependency, so npm install -g
opensource-git alone is enough. Packaging notes (including macOS .dmg builds
and Gatekeeper) live in 아키텍처.md §7.4.
Publishing (maintainers)
Releases are published to npm by the
npm-publish GitHub Action: create a
GitHub Release (or run the workflow manually) and it typechecks, builds,
runs the full test suite and npm publishes. It needs an NPM_TOKEN
repository secret (npm → Access Tokens → Automation).
# manual alternative
npm version patch
npm run build && npm publish --access publicHandy scripts:
npm run fixtures # generate demo/conflict repos in ./fixtures for playing around
npm run test:git # functional tests for the git layer
npm run test:lines # line-level staging patch builder + remotes
npm run test:multi # squash/drop/move history rewriting + worktree WIP rows
npm run test:stash # stash persistence across rebases
npm run test:rebase # per-commit rebase conflict flow + undo
npm run test:layout # graph lane-layout sanity checks
npm run typecheck
npm run dist # package installers (Windows: NSIS + portable, macOS: dmg + zip)GitHub / GitLab setup
Settings → Integrations → Add profile…
| Provider | Host examples | Token |
| --- | --- | --- |
| GitHub | github.com, GHE host | PAT with repo scope |
| GitLab | gitlab.com, gitlab.mycompany.com | PAT with api (or read_api + read_repository + write_repository) |
Tokens are stored encrypted at rest (Electron safeStorage, DPAPI/Keychain)
and used to authenticate HTTPS clone/fetch/push and to list your repositories in
the Clone dialog. Repositories reachable through your system credential
manager or SSH work without any profile.
Architecture
electron/ main process: window, IPC, fs watcher
gitService.ts all git operations (simple-git → system git); Electron-free & unit-tested
hosting.ts GitHub / GitLab REST clients
config.ts prefs + encrypted integration profiles (~/.opensource-git/config.json)
shared/ types shared across processes
src/ React renderer
graph/layout.ts commit-graph lane assignment
store.ts zustand store + all user-facing actions
components/ graph, panels, diff, conflict editor, menus, modals
scripts/ fixture generator, test suites, screenshot harnessSecurity posture: contextIsolation + sandboxed renderer, no nodeIntegration,
a strict CSP, and simple-git's command-injection guards left fully enabled
(no editor/askpass/pager overrides — commands are designed to never need them).
Roadmap
- Interactive rebase (drag to squash/reorder)
- File history & blame views
- Submodules panel
- Commit graph search/filter
- Image diffs, syntax highlighting in diffs
