Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf511ab5

Browse files
committed
fix git init default branch warning
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent6c431a0 commitf511ab5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/services/git/index.ts

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

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp