Skip to content

Commit

Permalink
Merge pull request #422 from korthout/korthout-fix-draft-conflict-sug…
Browse files Browse the repository at this point in the history
…gestions

Suggest to fetch and checkout draft pr branch directly
  • Loading branch information
korthout authored May 28, 2024
2 parents 7d390fd + 863937d commit da478f7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/backport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit da478f7

Please sign in to comment.