branch-behind-upstream
branch
main is 3 commits behind origin/main, worktree clean
Description
`main` is fast-forwardable — `origin/main` has 3 commits the local branch doesn't. Upstream tracking is configured so `git status` reports the behind count. Useful for testing: - pull workflows / "update available" prompts - behind-count rendering in branch lists and headers - "fast-forward possible" indicators
Contracts
- main is checked out
- main has 2 commits
- main is 3 commits behind origin/main
- main tracks origin/main
- worktree is clean
Tags
Branches
main Use it
import { spinUpScenario } from '@gfargo/git-scenarios'
const repo = await spinUpScenario('branch-behind-upstream') npx git-scenarios create branch-behind-upstream import { describeWithScenario } from '@gfargo/git-scenarios/jest'
describeWithScenario('branch-behind-upstream', (getRepo) => {
it('should have the expected state', async () => {
const repo = getRepo()
// your assertions here
})
}) Commit graph
* 2237af0 (origin/main) upstream feat three
* 0890736 upstream feat two
* 4fe142e upstream feat one
* e657666 (HEAD -> main) feat: shared baseline
* 7520170 chore: initial