Skip to content

Commit

Permalink
Use git reset instead of git branch
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbbt authored Apr 30, 2021
1 parent b98b091 commit 57c3a02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function checkOutRemoteBranch(context) {

// Switch to remote branch
core.info(`Switching to the "${context.branch}" branch`);
run(`git branch --force ${context.branch} --track ${remote}/${context.branch}`);
run (`git reset --hard ${remote}/${context.branch}`);
run(`git checkout ${context.branch}`);
}

Expand Down

0 comments on commit 57c3a02

Please sign in to comment.