Skip to content

Commit

Permalink
fix(git): checkout with — (#8538)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Feb 4, 2021
1 parent 61a294d commit 6ab2b02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util/git/index.ts
Expand Up @@ -396,7 +396,7 @@ export async function checkoutBranch(branchName: string): Promise<CommitSha> {
config.currentBranchSha = (
await git.raw(['rev-parse', 'origin/' + branchName])
).trim();
await git.checkout([branchName, '-f']);
await git.checkout(['-f', branchName, '--']);
const latestCommitDate = (await git.log({ n: 1 }))?.latest?.date;
if (latestCommitDate) {
logger.debug({ branchName, latestCommitDate }, 'latest commit');
Expand Down

0 comments on commit 6ab2b02

Please sign in to comment.