feat: create‑or‑reset the local branch from the tracking ref and explicitly wire up the upstream

This commit is contained in:
Alpha Nerd 2026-05-12 09:00:44 +02:00
parent 4585d60516
commit d5ddab0cbd
Signed by: alpha-nerd
SSH key fingerprint: SHA256:QkkAgVoYi9TQ0UKPkiKSfnerZy2h4qhi3SVPXJmBN+M

View file

@ -694,7 +694,7 @@ async function checkoutLocalBranch(pr: ForgejoPullRequest) {
"fetch", "origin", "--depth=100",
`+refs/heads/${branch}:refs/remotes/origin/${branch}`,
])
await $`git checkout ${branch}`
await $`git checkout -B ${branch} --track origin/${branch}`
}
async function checkoutForkBranch(pr: ForgejoPullRequest) {