GitGhost 👻
Zero-token, offline-first natural language Git controller and multi-commit orchestrator for VS Code.
Created by Swayam Kiran Prabhu (@swayamprabhu2005)
GitGhost transforms simple, natural English instructions into executed Git operations without using cloud AI models, external API keys, or consuming Copilot quota.
🌟 Why GitGhost?
| Feature |
GitHub Copilot |
GitGhost |
| Credit / Token Cost |
❌ Consumes quota / subscription tokens |
✅ $0 / Zero credits required |
| Internet Dependency |
❌ Requires active cloud connection |
✅ 100% offline-ready (internet only for push) |
| Commit Message Style |
⚠️ Generic or rigid format |
✅ Human (Natural English) or Conventional |
| Multi-Commit Splitting |
❌ Cannot partition dirty trees into $N$ commits |
✅ Intelligent $K$-way balanced partitioning |
| Repository Setup |
❌ Manual CLI commands required |
✅ 1-step init & remote linking from URL |
| Latency |
⏱️ 2 to 6 seconds per network call |
⚡ < 15 milliseconds (instant execution) |
| Source Privacy |
❌ Sends diffs to third-party servers |
🔒 100% local (diffs never leave machine) |
| Dedicated UI |
💬 Copilot Chat window only |
🎨 Activity Bar Sidebar Chat, QuickPicks & Status Bar |
🚀 Key Capabilities
Click the GitGhost icon on the left Activity Bar to open an interactive chat interface:
- Conversational message thread with instant execution
- Interactive Commit Cards with file diff breakdowns
- Quick-action shortcut chips (
⚡ Smart Split, 🚀 Init & Remote, ↩️ Undo Commit, 🌿 New Branch, 📦 Stash, ⬆️ Push)
- Live branch status badge and commit style switcher
2. Human vs. Conventional Commit Style Preference
Choose how your commit messages look in Settings or switch styles directly in the chat:
- Human Style (Default): Produces clean, imperative English sentences like a human engineer would write:
"Add responsive Navbar and Header drawer components"
"Update project dependencies and TypeScript build settings"
- Conventional Style: Standard semantic prefixes for changelog tooling:
"feat(frontend): add responsive Navbar and Header drawer components"
3. Repository Initialization & Remote Linking
Start new projects effortlessly:
init repo and set remote https://github.com/swayamprabhu2005/GitGhost.git
GitGhost runs git init, aligns the branch to modern main, links your remote origin URL, and prepares your first commit.
4. Intelligent Multi-Commit Partitioning ($K$-Way Splitting)
Have a messy working directory with 20 changed files?
split into 3 commits with frontend first
GitGhost analyzes your files, scans relative import statements so dependent files stay together, balances lines of code changed, and sequences the commits logically.
5. Co-Authors & Team Attribution
Give full credit to teammates directly in commits:
commit with co-author Alex <alex@example.com> and Jane <jane@example.com>
Appends standard Co-authored-by: metadata trailers that GitHub automatically recognizes in contribution graphs.
GitGhost automates everyday Git tasks that developers often have to search for:
| Action |
Natural Language Command |
What GitGhost Does |
| Undo Commit |
"undo my last commit but keep changes" |
Runs git reset --soft HEAD~1 safely |
| Squash Commits |
"squash last 3 commits into one" |
Consolidates recent commits into a single clean commit |
| Cherry-Pick |
"cherry pick commit a1b2c3d" |
Applies specific commits across branches |
| Release Tagging |
"create tag v1.0.0 and push" |
Creates annotated tag and pushes to remote |
| Named Stashes |
"stash changes as 'wip auth'" |
Saves and names stashes; restores via "pop stash" |
| Branch Cleanup |
"delete merged branches" |
Safely cleans up local branches merged into main |
| Sync with Main |
"sync branch with main" |
Performs clean pull --rebase origin main |
| History & Blame |
"show last 5 commits" / "who worked on auth.ts" |
Inspects recent log or file blame |
7. Slang & Confirmation Safeguards
When developer slang is detected (e.g., "yeet this stuff into two dumps" or "nuke my changes"), GitGhost triggers an interactive confirmation modal:
🤖 GitGhost: "I understood you want to: Divide uncommitted changes into 2 separate commits. Is this correct?"
[ Proceed ] [ Cancel ]
8. Offline Reachability & Push Queue
Commits and branches are always created locally. Before pushing, GitGhost probes socket connectivity to your remote host (github.com:443). If offline:
- Your local commits remain safe.
- The push is enqueued in the status bar (
$(cloud-upload) GitGhost (1 offline push queued)).
- You can sync with a single click when back online.
💻 How to Use
Click the GitGhost Ghost Icon in the VS Code Activity Bar on the left rail.
2. VS Code Chat Participant (@gitghost)
Open the VS Code Chat panel and type:
@gitghost split into 4 commits with backend first
3. Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
GitGhost: Run Natural Language Command
GitGhost: Smart Split Changes into N Commits
GitGhost: Generate Commit Message
GitGhost: Create Clean Orphan Branch
GitGhost: Initialize Repository & Remote
GitGhost: Show Git Status & Safety Queue
⚙️ Settings
Configure GitGhost via Settings (Ctrl+,) $\rightarrow$ Extensions $\rightarrow$ GitGhost:
| Setting |
Default |
Description |
gitghost.commitMessageStyle |
"human" |
Style of messages: "human" (natural English) or "conventional" (feat:, fix:). |
gitghost.autoStashSafety |
true |
Creates automatic backup stashes before dangerous operations. |
gitghost.confirmationThreshold |
0.85 |
Confidence threshold below which confirmation is requested. |
gitghost.defaultRemote |
"origin" |
Default remote name for push and fetch. |
gitghost.verifyConnectivityBeforePush |
true |
Tests socket reachability to Git host before pushing. |
🧪 Testing & Verification
# Compile TypeScript production bundle
npm run compile
# Run full test suite
npm run test:all
📄 License
MIT © GitGhost Contributors