feat: create‑or‑reset the local branch from the tracking ref and explicitly wire up the upstream
This commit is contained in:
parent
4585d60516
commit
d5ddab0cbd
1 changed files with 1 additions and 1 deletions
2
index.ts
2
index.ts
|
|
@ -694,7 +694,7 @@ async function checkoutLocalBranch(pr: ForgejoPullRequest) {
|
||||||
"fetch", "origin", "--depth=100",
|
"fetch", "origin", "--depth=100",
|
||||||
`+refs/heads/${branch}:refs/remotes/origin/${branch}`,
|
`+refs/heads/${branch}:refs/remotes/origin/${branch}`,
|
||||||
])
|
])
|
||||||
await $`git checkout ${branch}`
|
await $`git checkout -B ${branch} --track origin/${branch}`
|
||||||
}
|
}
|
||||||
|
|
||||||
async function checkoutForkBranch(pr: ForgejoPullRequest) {
|
async function checkoutForkBranch(pr: ForgejoPullRequest) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue