Skip to content

Commit

Permalink
fix(git): reset branch to default before fetch
Browse files Browse the repository at this point in the history
Closes #10261
  • Loading branch information
rarkins committed Jun 1, 2021
1 parent da8676d commit d1a951f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/util/git/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ export async function syncGit(): Promise<void> {
if (await fs.exists(gitHead)) {
try {
await git.raw(['remote', 'set-url', 'origin', config.url]);
await resetToBranch(await getDefaultBranch(git));
const fetchStart = Date.now();
await git.fetch(['--depth=10']);
config.currentBranch =
Expand Down

0 comments on commit d1a951f

Please sign in to comment.