A VS Code status bar button that shows how many commits the current repository is behind its upstream branch, and runs git pull when clicked.
What it does
- Adds an item to the right side of the status bar.
- Detects the git repo from the active editor's file, or the workspace folder if no file is open.
- Shows one of:
git_pull (N)— N commits behind upstream (red background when behind).git_pull (up to date)— even with upstream.git_pull (no upstream)— branch has no upstream configured.git-pull: no repo— no git repo detected.
- Updates live whenever VS Code's git extension refreshes the repo state (commit, push, pull, manual git activity, or the built-in auto-fetch).
- Click to run
git pullin the detected repo. Uses VS Code's built-in git extension so authentication (SSH keys, credential helpers) works the same way the SCM view does.
Keeping the count fresh
This extension never fetches from the remote on its own — that's deliberate, so it can't pop up credential prompts. The behind count refreshes via VS Code's built-in git.autofetch. To get a periodic background refresh, enable it:
"git.autofetch": true,
"git.autofetchPeriod": 180
Without git.autofetch, the count only updates when something else in VS Code talks to git (a commit, a manual fetch, a pull). Clicking the button always runs a real git pull, which is the on-demand way to force a refresh.
Requirements
- VS Code 1.120 or later.
- The built-in
vscode.gitextension must be enabled (it ships with VS Code by default).
Known limitations
- In a multi-root workspace with multiple git repos, the active editor's repo wins; otherwise the first workspace folder with a git repo is used.
- Only commits-behind is tracked. Local modifications and commits-ahead are shown by VS Code's built-in indicators.