diff --git a/src/apps/apps.service.ts b/src/apps/apps.service.ts index 1e11d34..120477a 100644 --- a/src/apps/apps.service.ts +++ b/src/apps/apps.service.ts @@ -714,13 +714,27 @@ export class AppsService { if (!isUnrelatedHistoryError(message)) { throw error; } - await execFileAsync(gitBin, [ - ...mergeOptions, - 'merge', - '--allow-unrelated-histories', - '--no-ff', - commitSha, - ], { cwd: workDir }); + try { + await execFileAsync(gitBin, [ + ...mergeOptions, + 'merge', + '--allow-unrelated-histories', + '--no-ff', + '--no-edit', + commitSha, + ], { cwd: workDir }); + } catch { + await execFileAsync(gitBin, [ + ...mergeOptions, + 'merge', + '--allow-unrelated-histories', + '--no-ff', + '--no-edit', + '-X', + 'theirs', + commitSha, + ], { cwd: workDir }); + } } } else { await execFileAsync(gitBin, [