multi-remote-with-tracking
branch
origin + upstream remotes; main tracks upstream/main, feat/fork-work tracks origin
Description
The "OSS fork contributor" baseline. Two remotes configured: `origin` (your fork) and `upstream` (the source project). `main` tracks `upstream/main` so you can pull source-project changes; `feat/fork-work` tracks your fork's branch for PR work. Useful for testing: - multi-remote rendering in the remotes / branches views - per-branch upstream resolution (different remotes per branch) - "which remote does this branch track?" inspectors
Contracts
- origin and upstream remotes are configured
- feat/fork-work is checked out
- main tracks upstream/main
- feat/fork-work tracks origin/feat/fork-work
- feat/fork-work is 2 commits ahead of origin/feat/fork-work
- main and upstream/main are at the same commit
- worktree is clean
Tags
Branches
feat/fork-workmain Use it
import { spinUpScenario } from '@gfargo/git-scenarios'
const repo = await spinUpScenario('multi-remote-with-tracking') npx git-scenarios create multi-remote-with-tracking import { describeWithScenario } from '@gfargo/git-scenarios/jest'
describeWithScenario('multi-remote-with-tracking', (getRepo) => {
it('should have the expected state', async () => {
const repo = getRepo()
// your assertions here
})
}) Commit graph
* ad1e759 (HEAD -> feat/fork-work) feat: fork work two
* 6ba3e46 feat: fork work one
* 59f2ca6 (origin/feat/fork-work) feat: scaffold fork work
* a0dbf3b (upstream/main, main) feat: baseline
* 5eb70f1 chore: initial