From 0e467a1bdf7ff25b421aec03c9605c67d314970c Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Tue, 24 Mar 2026 18:40:06 -0700 Subject: [PATCH] Fix git init failing when no default branch or user config is set --- src/server/api/apps.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/api/apps.ts b/src/server/api/apps.ts index 75cbd1b..ab29e13 100644 --- a/src/server/api/apps.ts +++ b/src/server/api/apps.ts @@ -147,9 +147,9 @@ router.post('/', async c => { const run = (cmd: string[]) => Bun.spawn(cmd, { cwd: tmpDir, stdout: 'ignore', stderr: 'ignore' }).exited - await run(['git', 'init']) + await run(['git', 'init', '-b', 'main']) await run(['git', 'add', '.']) - await run(['git', 'commit', '-m', 'init']) + await run(['git', '-c', 'user.name=toes', '-c', 'user.email=toes@localhost', 'commit', '-m', 'init']) await run(['git', 'remote', 'add', 'toes', gitUrl(name)]) const exitCode = await run(['git', 'push', 'toes', 'main'])