Git
The Git tab
Every card on a server's Git tab, from HEAD to the working copy — what each one shows, where it reads it from, and the few things that run git.
Opening the tab#
Every server's screen has a Git tab, between Stats and Ports: click the row — or press ↵ — and switch to it. Two shortcuts land on it directly. Clicking a Git notification opens Pip on that server's Git tab, and in Quick actions (Q) the entry for a server in a repository offers Show Git tab.
Nearly everything on the tab is read straight from the files in .git: no git program runs, and nothing is written. Three things run the git installed on your computer: Fetch, Check with git and History, each when you ask — Fetch also on a schedule, if you turn that on — plus git --version, to find out whether git is there at all. Fetch is the only one that uses the network, apart from History in a partial clone on an older git — see partial clones.
From the top: while a merge, rebase or similar is unfinished, a banner and a Conflicted files card — more on those. Then HEAD, Remote, Repository and Working copy, and Worktrees when the repository has more than one. For a server in WSL or a container, the cards show what the scan read and say where to do the rest. A Windows process serving from a \\wsl.localhost share is treated the same way for anything read on demand.
When there are no cards#
A server that is not running from inside a repository gets “Not a git repository” and one line saying where it does run from:
- A plain folder
- “Running from D:\Code\notes.” The process's working directory is not inside a repository. Click the folder to open it.
- A Compose container
- “Its compose project is in …” The compose folder on this computer is not inside a repository.
- Another container
- “This container was not started by Docker Compose.” With no compose folder, there is nowhere to look.
- No folder
- “Pip could not read this process's working directory — it may be running elevated.” See Windows permissions.
A repository that keeps its refs in git's reftable format gets “This repository uses a ref format Pip cannot read.” and its folder, and no cards: Pip names no branch, commit or upstream rather than guess them from stub files. More on unusual repositories.
The HEAD card#
Its title is the branch — or, while a rebase holds HEAD detached, the branch being rebased — and otherwise the short commit id. The label beside it says Branch, Linked worktree, Submodule, Detached HEAD or Detached while rebasing. Below sit the first 12 characters of the commit id, with the full id on hover, and any tags pointing at that commit: up to eight, then “More tags point here”. A branch with nothing on it yet says “No commits yet”.
Under the id are the commit's subject and a time such as Committed 2 hours ago, both read from the reflog — the log git keeps of every move HEAD makes. The time is when the commit landed in this clone, by a commit, a cherry-pick or a rebase step, not its author date. Merges, pulls and resets write no subject into that log, and old entries expire; then you see “Subject not recorded” with a line saying why. For a server in WSL or a container, no subject or tags are read.
The copy button copies the branch name — or, while HEAD is detached, the full commit id — and works for every row. History opens HEAD's last 40 commits as a graph. It runs git log, so it needs git on your computer and a server running directly on it; where it cannot run, the card says why instead, as in “Install git to see the history here.” or “History is read inside WSL.” More on commit history.
The Remote card#
It shows origin's address with any credentials in it removed — click it to open the repository's page in your browser — or “No origin configured”. Beside the title: where the branch stands against the branch it tracks, and when this clone last fetched, as in In sync · Fetched 2 hours ago, 2 ahead, 5 behind or Upstream branch deleted. Any fetch counts, including one from your terminal or your editor. Under the address, Tracks origin/main names the branch it follows, and when the repository has other remotes a line such as Remotes: origin, upstream (tracked) lists them — worth a look, since Fetch only ever fetches origin.
Fetch — or F while the tab is showing — runs git fetch origin, with pruning off and no credential prompts. Open pull request (Open merge request on GitLab) opens the host's new pull request page in your browser. For a server in WSL or a container, the Fetch button gives way to “Fetch from inside WSL.” or “Fetch from inside the container.” Fetch and sync covers both buttons, every message, and what a fetch changes.
The Repository card#
The repository's folder — with Started in and the server's own folder when that is somewhere inside it — and its counts beside the title, as in 4 branches · 12 tags · 2 stashes. A count that hit a limit says “at least”; hover the stashes for git's message for the newest one. Review branches opens the Branches review. Under the folder sit a few standing facts:
- Committing as
- The name and email address a commit made here would carry, which file each came from — this repository, this worktree's config or your global config — and Signs commits when signing is on. It is your config as Pip's own environment sees it. The system config, and identity variables set in the shell where you commit, are not seen, and an included file Pip cannot evaluate adds a line saying the answer may differ.
- Submodules
- How many the repository declares, and how many are not initialised or not checked out. Nothing inside them is read.
- Hooks
- The hooks git would run here, by name, and what set them up — husky, lefthook, or a
core.hooksPath. Hooks are never run or opened. - LFS objects
- The size of the Git LFS store on disk, when there is one.
- Worktrees
- A card of its own, last on the tab, when the repository has more than one: each worktree's branch or short commit and its folder, marked this one, main worktree, locked or folder missing.
These are read when the tab opens, every 30 seconds while it is on screen, and when you come back to the window. The strip at the foot of the card mutes Git notifications for the repository, every worktree at once — more on notifications. An agent's detail shows the same Committing as and worktrees under Repository. For a server in WSL or a container the card keeps its folder and its branch and stash counts, with no tag count, no facts, no Review branches and no mute strip.
The Working copy card#
Without running git, the card compares each tracked file's size and modification time with what the index recorded — the quick check git itself makes first — and looks for untracked files, honouring your ignore rules. Each kind of definite change gets a row — Conflicted, Modified, Deleted, Added, not staged or Untracked — with up to five sample paths below. It asks again every five seconds while the tab is on screen, and Checked just now beside the title says when it last did. An edited file shows on the next ask, but the search for untracked files runs at most every 30 seconds unless git itself writes, so a new untracked file can take that long to appear — as can an edit in a repository large enough that one comparison takes over half a second.
It never reads staged changes or file contents, so the cleanest it says is “No unstaged changes”, and only when every file was settled. Where git would have to read a file to decide, the card says possibly modified or adds a note rather than guess. A repository too big to finish says so: “Too large to compare” above 250,000 tracked files, or “Stopped after … the counts are a floor.” when two seconds run out. For a server in WSL or a container it says “Pip compares the working copy only for servers on this computer, not in WSL or a container.”
Check with git#
Check with git, on the Working copy card, asks git itself. It runs git status once per click, never on a timer, set up to take no lock so it writes nothing — not even the index refresh a plain git status can make. git's answer appears under the card's own reading, as 4 changed · 2 staged · 3 new files or No changes, followed by git checked just now.
That adds the one thing the card cannot see: what is staged. Changed counts every tracked file with a change, staged or not, conflicts included; staged is those of them whose staged version differs from the last commit. A new folder counts as one new file, as git status lists it, and a submodule counts only when its commit moved.
The button appears only for a server running directly on this computer, and only when git answers. git gets 10 seconds — “Too big for git to check in 10 seconds.” — and a refusal, such as a safe.directory check, is quoted in git's own English: “git couldn't check this working tree: …”
Did this page not answer it? Tell us what you were looking for — that is how Pip's documentation gets written.