diff --git a/index.ts b/index.ts index 1131e7a..c23006c 100644 --- a/index.ts +++ b/index.ts @@ -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) {