A modern, web-based Git client built with Next.js. Manage your repositories, view commit history with a visual graph, and perform common Git operations through an intuitive interface.
- Repository Management - Add, delete, and manage multiple local Git repositories
- Visual Commit Graph - Fork-style commit visualization with branch lanes
- Branch Operations - Create, checkout, delete, rename, rebase, and merge branches
- Conflict Resolver - Detect merge/rebase conflicts and resolve them with a dedicated workflow
- Change Staging - Stage/unstage files individually or all at once
- Stash Support - Stash, reapply, and delete stashed changes
- Diff Viewer - Syntax-highlighted diff view for reviewing changes
- Commit History - Browse commit history with infinite scroll and branch filtering
- Branch Deep Links - Open History with
?branch=<name>to initialize branch checkout/head focus - Iconized Context Menus - Faster scanning with icons across branch/tag/commit/worktree actions
- Command Palette - Quick access to common actions via Cmd/Ctrl+K
- Settings - Configure default repository folder and preferences
- Dark/Light Mode - Theme toggle for comfortable viewing
- Open local repositories from a filesystem browser
- List recent repositories and reopen quickly (Command Palette)
- Delete repositories from the app list (without deleting files)
- Shared repository/settings storage across app instances
- Set repository display name
- Configure default root folder for browsing repositories
- Clone repositories from URL (HTTPS/SSH with optional credentials)
- Initialize a new repository when opening a non-Git folder
- GitHub repository picker in clone dialog (credential-aware)
- View working tree and index status
- Stage/unstage individual files
- Stage all / unstage all
- Discard unstaged changes and untracked files
- Stash changes with message
- List/apply/pop/drop stashes
- Inspect stash file lists and per-file stash diffs
- Commit with subject + optional body
- Amend latest commit message (reword)
- Visual commit graph with branch lanes
- Improved branch-junction rendering for same-row merges and aligned branch starts
- Branch visibility filters persisted per repository
- List local/remote branches with ahead/behind tracking info
- Create branch from current HEAD or selected ref
- Checkout local branch
- Checkout remote branch to new local tracking branch
- Delete local and remote branches
- Rename local branches
- Rename remote branches
- Merge with options (rebase-before-merge, squash, fast-forward)
- Rebase onto target branch (with optional auto-stash)
- Preflight conflict checks for merge/rebase
- Conflict resolver page for merge/rebase (stage resolved files, continue/abort)
- Hard/soft/mixed reset to selected commit
- Revert commits with confirmation
- Cherry-pick single/multiple commits and abort cherry-pick
- Commit details and per-file commit diffs (split/inline)
- One-way history branch query initialization (
?branch=<name>)
- Fetch default remote
- Fetch specific remote
- Fetch all remotes (prune)
- Pull from remote branch (rebase option)
- Push to remote branch (force, set-upstream, rebase-first, squash, local-tags)
- Manage remotes (add/rename/remove remote definitions)
- Create local tag and optionally push to remote
- Delete local tag
- Delete remote tag
- Manage credentials (GitHub/GitLab) and associate per repository
- Run repository custom bash scripts from branch context menu (with live output/cancel)
- Automated release tagging on main PR merge and npm publish on release tags
- Dark/light/system theme toggle
- Enter key confirms primary action across modal dialogs
- Image diff support and binary file detection
- Large-diff protection to prevent UI freeze
- Persist key UI state (sidebar/panel sizes/folders/filters)
- Git error handling with actionable messages + lock file cleanup action
- Commit signing (GPG/SSH)
- Co-author commit support
- Interactive rebase UI
- Blame/annotate view
- Submodule management
- Git LFS workflows
- Framework: Next.js 16 (App Router)
- Language: TypeScript
- UI Components: DaisyUI
- Styling: Tailwind CSS 4
- State Management: TanStack Query
- Git Operations: simple-git
- Diff Rendering: @alexbruf/react-diff-viewer
- Theming: next-themes
- Validation: Zod
- Node.js 18+
- Git installed and available in PATH
npx trident-gitThis launches the app on an available local port (default 3100).
You can also pass options:
npx trident-git --port 3200
npx trident-git --devPublished npm packages are expected to include a prebuilt .next output, so npx trident-git does not build on the end user's machine.
# Clone the repository
git clone <repository-url>
cd trident
# Install dependencies
npm install
# Start the development server
npm run devOpen http://localhost:3000 in your browser.
npm run build
npm start- Add a Repository - Click "Add Repository" on the home page and browse to select a local Git repository
- View Changes - The workspace view shows staged and unstaged changes with diff previews
- Commit Changes - Stage files and enter a commit message (Cmd/Ctrl+Enter to commit)
- Browse History - Navigate to the History tab to view the commit graph
- Manage Branches - Use the branch sidebar to switch, create, or manage branches
.github/workflows/ # CI/CD (release tagging + npm publish)
bin/ # Packaged CLI entrypoint
src/
├── app/ # Next.js App Router pages
│ ├── api/ # API routes for Git operations
│ │ ├── git/ # Git action endpoints
│ │ ├── fs/ # File system endpoints
│ │ └── repos/ # Repository management
│ └── workspace/ # Workspace pages (history, changes, stashes, settings)
├── components/ # React components
│ ├── git/ # Git-specific components
│ │ ├── diff-view.tsx
│ │ ├── git-graph.tsx
│ │ ├── history-view.tsx
│ │ └── status-view.tsx
│ ├── layout/ # Layout components
│ └── context-menu.tsx # Shared context menu (supports action icons)
├── hooks/ # Custom React hooks
├── lib/ # Utilities and services
│ ├── git.ts # Git service wrapper
│ ├── graph-utils.ts # Commit graph algorithms
│ ├── store.ts # State management
│ └── types.ts # TypeScript definitions
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run prepack |
Clean .next and build package artifacts before publish |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run cli |
Start through the packaged CLI launcher |
npm run pack:preview |
Preview npm package contents |
The repository ships with GitHub Actions workflows for automated releases:
- On pushes to
main(including local merge commits pushed to GitHub),Release On Main Mergebumps the npm minor version (npm version minor), creates av*tag, and pushes both commit + tag. Publish To NPMruns onv*tag pushes (and also after successful release workflow completion), resolves the release tag, verifies the tagged commit is onmain, and publishes withnpm publish --access public --provenance.
Required secret:
NPM_TOKENwith publish access to thetrident-gitpackage.
MIT
