Skip to content
slowdiniPublic

About

A Zed-style git pane mod for Claude Code: status, staging, commits, branches, push/pull and PRs across every repo in the session.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

git-pane

A git panel for Claude Code, modeled on the git panel in editors like Zed. It shows the repositories in the session in a pane beside the chat, and lets you stage, commit, switch branches, push, pull and follow pull requests without leaving Claude or typing git commands.

It works in the Claude desktop app's Code tab and in the terminal (docked beside the transcript in fullscreen mode, above the prompt otherwise).

What the pane shows

The pane shows one repository at a time. When the session has more than one, a Repo picker at the top chooses which, and the pane remembers your choice for the next session in the same folder.

It has three parts, with a line between each two:

  1. The branch. The repository, its branch, how far it is ahead of or behind its upstream, and the branch's pull request with its state, CI checks and review, or a + Create PR button. Under those, Fetch, Pull and Push (or Publish for a branch with no upstream yet).
  2. The files. Conflicts, staged files and changed files, each file with its status letter.
  3. The commit. The commit message field, then one status line: what just worked, or what failed.

In a docked pane with enough height, the branch stays at the top and the commit at the bottom edge, and the file list scrolls between them. When the list is longer than its space, +n more below and +n more above rows say how many files are out of view; press one to move a page, or use the wheel. Above the terminal's prompt, and in a dock too short for that, the commit comes before the files and the whole pane scrolls.

And from the pane you can:

  • Stage or unstage a file by pressing its row, or use Stage all / Unstage all
  • Write a message and commit
  • Switch to another branch, or create one with + New
  • Delete a branch with Delete beside + New: pick the branch, then press Delete. A branch merged into the default branch goes at once; any other asks first. Deleting the branch you're on switches to the default branch first, and isn't allowed while you have uncommitted changes. Merged, not on remote deletes every merged branch whose remote branch is gone or that was never pushed.
    • A branch counts as merged when the remote's default branch reaches it, or, with gh signed in, when it still points at the last commit of a merged pull request (which covers squash and rebase merges).
  • Discard a file's changes with its ✕, and Stash or Pop from the Changes header. Each of these asks for confirmation right under the control you pressed.

While the pane has the keyboard, f, p and u fetch, pull and push. In the terminal, c commits; in the desktop app, use the message field's own Commit button or press Enter.

The pane fits the width it's given: in a narrow pane the buttons wrap and file rows leave out the folder. Above the prompt (the terminal outside fullscreen), each file section shows its first five files and how many more there are.

When the desktop app minimizes the pane to a widget, it shows one line per repository: branch, ahead/behind, and the number of changes and conflicts.

Requirements

  • git 2.11 or later, required.
  • GitHub CLI (gh), optional, signed in with gh auth login. It's used for the pull request row and to recognize squash-merged branches. Without it the pane says so and everything else works.

Install

At the prompt of a Claude Code session in a terminal:

/plugin install git-pane --marketplace slowdini/git-pane

From a shell:

claude plugin install git-pane --marketplace slowdini/git-pane

In the desktop app, click + next to the prompt box, then Plugins > Add marketplace, enter slowdini/git-pane, then Add plugin.

Updates

The plugin installs from the latest release, and each release is listed on the repository's Releases page.

Claude Code doesn't update plugins from this marketplace automatically unless you turn that on. To turn it on, open /plugin in a session and enable auto-update for the git-pane marketplace on its Marketplaces tab. To update by hand, run this from a shell, then restart Claude Code:

claude plugin update git-pane@git-pane

Use

Run /git-pane to open the pane. In the desktop app you can also click git beside the message box, or right-click the conversation and choose Open git pane. Click git again to close the pane. That closes it even while it's hidden behind another tab, so if the pane is open but out of sight, the first click closes it and the second opens it again.

If you leave the pane open, it opens again in your next session. Close it to stop that. In the desktop app, close it with git: the X on the side panel's Plugin tab doesn't close plugin panes, and the pane comes back at the end of the tabs.

The desktop app labels the pane's tab Plugin, with its generic plugin icon, as it does for every plugin pane.

The pane refreshes every few seconds while it's open, after Claude edits files or runs commands, and after each action you take in it. Pull request details refresh once a minute and after each push.

Repositories it finds

The pane lists, once each:

  1. The repository the session runs in.
  2. Folders listed in permissions.additionalDirectories in your Claude Code settings.
  3. Folders added with /add-dir during the session.
  4. Repositories directly inside the session's folder, including symlinked ones. Turn this off with the scanChildRepos option.

A workspace folder holding several repositories, or a project that names its sibling repositories in additionalDirectories, shows all of them.

Options

Set these in the plugin's settings (the config menu in a terminal session).

Option Default What it does
pollSeconds 5 How often the pane re-reads git status while it's open.
autoFetchMinutes 0 Runs git fetch --prune on every listed repository this often while the pane is open. 0 turns it off.
scanChildRepos true Also list repositories found directly inside the session's folder.

How actions run

  • Commit, push, pull and switching branches run through Claude Code's Bash tool, so your repository's git hooks (pre-commit, commit-msg, pre-push, post-checkout) run as they do in a terminal.
  • Reading status, staging, fetch, discard, stash and deleting a branch run git directly. The remote's default branch comes from git ls-remote, asked when the pane opens and after Fetch, since the local origin/HEAD keeps whatever it was at clone time.
  • Push never forces. Network commands run with GIT_TERMINAL_PROMPT=0, so a missing credential fails with an error instead of waiting for input.
  • Colors come from your Claude Code theme, so the pane follows light mode, dark mode and custom themes.

Development

The plugin lives in plugin/, with its hooks module in plugin/hooks/. Installs get only that folder. The repository root holds the marketplace manifest and the dev tooling, so none of the tooling reaches users. A package.json inside plugin/ would: Claude Code runs npm ci in an installed plugin that has one.

Working on it needs Node.js and Claude Code. Start with:

npm install

That installs biome and TypeScript, the only dev dependencies, and turns on the repository's git hooks.

Command What it does
npm run check Lints and checks formatting with biome.
npm run fix Applies biome's formatting and safe fixes.
npm run typecheck Typechecks with tsc.
npm test Runs the tests with claude plugin test.
npm run validate Validates the marketplace and the plugin.
npm run design Regenerates design/tokens.css.

The checks also run on their own:

  • On commit: the pre-commit hook in .githooks/ checks the staged files with biome, and typechecks when TypeScript is staged.
  • In Claude Code: the project's hooks in .claude/settings.json format each file Claude edits, and typecheck before Claude finishes a turn that changed TypeScript.
  • On pull requests: CI runs biome, claude plugin validate --strict and the tests, and checks that design/tokens.css matches design/tokens.json.

Typechecking needs the type declarations Claude Code writes to plugin/.claude-plugin/types/ when it loads the mod, for example from claude --plugin-dir. Until then, the hooks skip the typecheck. CI can't load the mod, so it doesn't typecheck.

To run it from a checkout, start Claude Code with claude --plugin-dir /path/to/git-pane/plugin. Adding the repository as a local marketplace doesn't run your checkout: the marketplace entry always installs the plugin from plugin/ on the main branch on GitHub.

The pane's design lives in design/: the design system, a guide and a preview for each component, and the screen specs. Start with design/README.md, and open design/index.html in a browser to see the drawings. A change to how the pane looks updates the design in the same pull request.

Open pull requests against dev, the default branch. A release merges dev into main, which is what installers get. RELEASE.md covers how to cut one.

License

MIT

About

A Zed-style git pane mod for Claude Code: status, staging, commits, branches, push/pull and PRs across every repo in the session.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages