#!/bin/bash
set -eu
export GIT_AUTHOR_DATE=2026-11-10T12:00:00Z
export GIT_COMMITTER_DATE=2026-11-10T12:00:00Z
workspace="$1"
mkdir -p "$workspace"
git -C "$workspace" init -b main
git -C "$workspace" -c user.name=Evidence -c user.email=evidence@example.invalid commit --allow-empty -m 'Synthetic example'
git -C "$workspace" branch feature/alpha
git -C "$workspace" branch feature/beta
git -C "$workspace" branch feature/no-pr
git -C "$workspace" remote add origin https://git.cafe/evidence/branch-demo.git
for branch in main feature/alpha feature/beta feature/no-pr; do
 git -C "$workspace" update-ref "refs/remotes/origin/$branch" HEAD
 git -C "$workspace" config "branch.$branch.remote" origin
 git -C "$workspace" config "branch.$branch.merge" "refs/heads/$branch"
done
git -C "$workspace" symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main
git -C "$workspace" switch feature/alpha
