diff --git a/src/backport.ts b/src/backport.ts index a8b3128..02c9adc 100644 --- a/src/backport.ts +++ b/src/backport.ts @@ -614,10 +614,9 @@ export class Backport { if (branchExist) { if (confictResolution === "draft_commit_conflicts") { return dedent`\`\`\`bash - git fetch origin ${target} - git worktree add -d .worktree/${branchname} origin/${target} + git fetch origin ${branchname} + git worktree add --checkout .worktree/${branchname} origin/${target} cd .worktree/${branchname} - git switch ${branchname} git reset --hard HEAD^ git cherry-pick -x ${commitShasToCherryPick.join(" ")} git push --force-with-lease