From 57c3a026ab6fe779bd98eb22f49bc7fe24553fb2 Mon Sep 17 00:00:00 2001 From: Alexander Bell-Towne Date: Fri, 30 Apr 2021 01:00:58 -0400 Subject: [PATCH] Use git reset instead of git branch Fixes https://github.com/wearerequired/lint-action/issues/193 --- src/git.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/git.js b/src/git.js index bfd84822..83782eda 100644 --- a/src/git.js +++ b/src/git.js @@ -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}`); }