diff --git a/lib/util/git/index.ts b/lib/util/git/index.ts
index a3f2a9fc49c01b7997f06d2f8b96956959dbbd4c..125f077280cf189180d2a78e45cc8d1bbc835b29 100644
--- a/lib/util/git/index.ts
+++ b/lib/util/git/index.ts
@@ -216,7 +216,7 @@ async function setBranchPrefix(branchPrefix: string): Promise<void> {
     logger.debug('Setting branchPrefix: ' + branchPrefix);
     const ref = `refs/heads/${branchPrefix}*:refs/remotes/origin/${branchPrefix}*`;
     try {
-      await git.fetch(['origin', ref, '--depth=2', '--force']);
+      await git.fetch(['origin', ref, '--depth=5', '--force']);
     } catch (err) /* istanbul ignore next */ {
       checkForPlatformFailure(err);
       throw err;