Tools

Git branches

Where the branch on each row comes from, and what Pip shows when there is not one.


How it reads the repo#

Pip takes the process's working directory, walks up to the repository root, and reads .git directly. No git binary is invoked, no shell is spawned, and nothing is written back — it is a read of a file format that has been stable for fifteen years.

What you will see#

A branch name
The usual case — main, feat/webhooks, whatever is checked out.
A short hash
Something like 9f8e7d6c means a detached HEAD — mid-rebase, or checked out to a tag or a specific commit.
Nothing at all
The server is not running from inside a repository. It still gets detected on its runtime or its port; there is simply no branch to show.

When you switch branches#

The ref is re-read on every scan, so a git switch in your terminal shows up in the row within five seconds. You do not need to restart the server, or Pip.

Did this page not answer it? Tell us what you were looking for — that is how Pip's documentation gets written.