Skip to content

Commit

Permalink
fix: git fetch before checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
btkostner authored Aug 29, 2023
1 parent 52a71cc commit b797bff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ export async function cloneRepository(config: Config): Promise<void> {
},
);

await exec(`git checkout --detach ${syncTree}`, [], {
await exec(`git fetch`, [], {
cwd: syncPath,
silent: !core.isDebug(),
});

await exec(`git checkout --progress --force ${syncTree}`, [], {
cwd: syncPath,
silent: !core.isDebug(),
});
Expand Down

0 comments on commit b797bff

Please sign in to comment.