Skip to content
Snippets Groups Projects
Commit d1a951f5 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix(git): reset branch to default before fetch

Closes #10261
parent da8676de
No related branches found
Tags 37.55.1
No related merge requests found
...@@ -265,6 +265,7 @@ export async function syncGit(): Promise<void> { ...@@ -265,6 +265,7 @@ export async function syncGit(): Promise<void> {
if (await fs.exists(gitHead)) { if (await fs.exists(gitHead)) {
try { try {
await git.raw(['remote', 'set-url', 'origin', config.url]); await git.raw(['remote', 'set-url', 'origin', config.url]);
await resetToBranch(await getDefaultBranch(git));
const fetchStart = Date.now(); const fetchStart = Date.now();
await git.fetch(['--depth=10']); await git.fetch(['--depth=10']);
config.currentBranch = config.currentBranch =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment