Using the unpushed commits feature
Use the--include-unpushed or -u flag to see which repositories have commits that haven’t been pushed to their upstream branch:
Understanding the output
When enabled, repositories with unpushed commits show an ahead count:[↑N] indicator shows:
↑— Commits are ahead of upstreamN— Number of commits not yet pushed- Displayed in blue color
The ahead count only appears when there are unpushed commits (N > 0). Repositories in sync with upstream won’t show the indicator.
How it works
The unpushed commits feature uses theahead_of_upstream function to:
- Get the current HEAD commit
- Resolve the upstream tracking branch
- Calculate how many commits ahead the local branch is
- Display the count if greater than zero
Performance note
The performance impact comes from:- Resolving upstream tracking branches
- Computing graph distance between local and remote commits
- Additional git operations per repository
When to use this feature
Before ending your workday
After working offline
Combined with filters
Edge cases
The ahead count won’t be calculated for:- Detached HEAD — Not on a branch
- Unborn branches — No commits yet
- No upstream tracking — Branch doesn’t track a remote branch
- Local-only repositories — No remote configured
[↑N] indicator simply won’t appear for those repositories.
Repositories marked as
[local] won’t show unpushed commits since they have no remote to compare against.