branch-ahead-of-upstream
branch
main is 3 commits ahead of origin/main, worktree clean
Description
`main` has 3 unpushed commits — `origin/main` sits 3 commits behind. Upstream tracking is fully configured, so `git status` reports the ahead count. Useful for testing: - push workflows / "publish your changes" prompts - ahead-count rendering in branch lists and headers - PR-creation flows that count unpushed commits
Contracts
- main is checked out
- main has 6 commits
- main is 3 commits ahead of 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-ahead-of-upstream') npx git-scenarios create branch-ahead-of-upstream import { describeWithScenario } from '@gfargo/git-scenarios/jest'
describeWithScenario('branch-ahead-of-upstream', (getRepo) => {
it('should have the expected state', async () => {
const repo = getRepo()
// your assertions here
})
}) Commit graph
* e27a9c8 (HEAD -> main) feat: ahead three
* afb7f71 feat: ahead two
* a2b6066 feat: ahead one
* 0d8eaf9 (origin/main) feat: baseline two
* f269069 feat: baseline one
* 7520170 chore: initial