From b342ec4a9ce8e496606d799796b72dc74766ada5 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Tue, 23 Mar 2021 20:50:37 -0400 Subject: [PATCH] Set initial-branch (#427) Signed-off-by: Josh Soref --- dist/index.js | 6 +++++- src/git-command-manager.ts | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index e765cc2..b025bb0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5859,7 +5859,11 @@ class GitCommandManager { } init() { return __awaiter(this, void 0, void 0, function* () { - yield this.execGit(['init', this.workingDirectory]); + yield this.execGit([ + 'init', + '--initial-branch=silence_warning_about_default_branch', + this.workingDirectory + ]); }); } isDetached() { diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index 409a161..e6641c6 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -229,7 +229,11 @@ class GitCommandManager { } async init(): Promise { - await this.execGit(['init', this.workingDirectory]) + await this.execGit([ + 'init', + '--initial-branch=silence_warning_about_default_branch', + this.workingDirectory + ]) } async isDetached(): Promise {