branch-tracking-upstream
branch
main tracks origin/main, both at the same commit, worktree clean
Description
Baseline "tracked branch" state — `main` has its upstream set to `origin/main` and both refs point at the same commit. No divergence. Useful for testing: - tooltips / status indicators that read tracking config - branch view icons distinguishing tracked vs untracked branches - "Your branch is up to date with 'origin/main'" rendering
Contracts
- main is checked out
- main has 3 commits
- origin/main exists at the same commit as main
- main is configured to track origin/main
- worktree is clean
Tags
Branches
main Use it
import { spinUpScenario } from '@gfargo/git-scenarios'
const repo = await spinUpScenario('branch-tracking-upstream') npx git-scenarios create branch-tracking-upstream import { describeWithScenario } from '@gfargo/git-scenarios/jest'
describeWithScenario('branch-tracking-upstream', (getRepo) => {
it('should have the expected state', async () => {
const repo = getRepo()
// your assertions here
})
}) Commit graph
* 6e30e6b (HEAD -> main, origin/main) feat: two
* c9e8aea feat: one
* 7520170 chore: initial