diff --git a/src/git.ts b/src/git.ts index 6f839e2..3d53c93 100644 --- a/src/git.ts +++ b/src/git.ts @@ -20,7 +20,12 @@ export async function cloneRepository(config: Config): Promise { }, ); - 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(), });