GitPanda v3.1.1 Install
Using GitPanda

The panda prompt

Show the company, branch and what's waiting right in your shell prompt whenever you're inside a clone.

Inside a clone, your prompt can show where you are and what's waiting, like git prompts do:

~/code/acme                                   ๐Ÿผ acme:main โœš1 โ—2 โ†‘1

Set it up#

gitpanda shell --install

It detects zsh or bash, shows exactly what it will add to ~/.zshrc or ~/.bashrc, and asks before writing. It also adds ~/.local/bin to your PATH if it's missing. Open a new terminal to see it.

  • In zsh it goes on the right side of your prompt (RPROMPT), so it doesn't disturb your own.
  • In bash it goes at the start of your prompt (PS1).

To see the snippet without installing it:

gitpanda shell zsh
gitpanda shell bash

To install without the question (for dotfiles scripts): gitpanda shell --install --yes.

What it shows#

Mark Meaning
๐Ÿผ acme:main The company and branch of the folder you're in
โœš1 1 file staged for the next commit
โ—2 2 files changed or new, not staged
โ†‘1 1 commit waiting to be pushed
โ†“3 3 new files from your team, as of your last fetch
โœ“ Clean: nothing changed, nothing to push

Outside a clone it shows nothing.

Fast and offline#

The prompt never talks to the network. It reads the clone's bookkeeping and only looks inside files whose size or modification time changed, so it stays fast even in large repositories.

Other shells and prompt tools#

gitpanda prompt prints the segment as plain text with colors, so you can use it anywhere:

gitpanda prompt                 # colored, for most prompt tools
gitpanda prompt --shell zsh     # with zsh's %{ %} escapes
gitpanda prompt --shell bash    # with bash's \[ \] escapes

For example, a Starship custom module:

toml
[custom.gitpanda]
command = "gitpanda prompt"
when = "gitpanda prompt | grep -q ."
format = "$output "

No emoji?#

If your terminal shows a box instead of ๐Ÿผ, use the ASCII mark:

export GITPANDA_ASCII=1     # shows (o.o)

Removing it#

Delete the lines starting with # gitpanda: (and the line after each) from ~/.zshrc or ~/.bashrc.