Skip to content

Commit

Permalink
Update worktree.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesIves committed Sep 29, 2024
1 parent ff20230 commit f1cf93b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/worktree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,15 @@ export async function generateWorktree(
info(
'Error encountered while checking out branch. Attempting to continue with a new branch name.'
)

await execute(
`git fetch origin ${action.branch}`,
`${action.workspace}/${worktreedir}`,
action.silent
)

branchName = `temp-${Date.now()}`
checkout = new GitCheckout(branchName)
checkout = new GitCheckout(branchName, `origin/${action.branch}`)

await execute(
checkout.toString(),
Expand Down

0 comments on commit f1cf93b

Please sign in to comment.