Skip to content

Commit f511ab5

Browse files
committed
fix git init default branch warning
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent 6c431a0 commit f511ab5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/services/git/index.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ export async function clear(): Promise<Error | void> {
7070
}
7171

7272
async function init(): Promise<Error | void> {
73-
const { stderr } = await exec({ command: 'git init' })
73+
// note: prevents stderr warning concerning default init branch
74+
const { stderr } = await exec({ command: 'git init --initial-branch=master' })
7475
if (stderr) {
75-
throw new Error('Error initializing Git')
76+
throw new Error(`Error initializing Git: ${stderr}`)
7677
}
7778
}
7879

0 commit comments

Comments
 (0)