Skip to content

Commit b342ec4

Browse files
committed
Set initial-branch (#427)
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
1 parent 25a956c commit b342ec4

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

dist/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5859,7 +5859,11 @@ class GitCommandManager {
58595859
}
58605860
init() {
58615861
return __awaiter(this, void 0, void 0, function* () {
5862-
yield this.execGit(['init', this.workingDirectory]);
5862+
yield this.execGit([
5863+
'init',
5864+
'--initial-branch=silence_warning_about_default_branch',
5865+
this.workingDirectory
5866+
]);
58635867
});
58645868
}
58655869
isDetached() {

src/git-command-manager.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,11 @@ class GitCommandManager {
229229
}
230230

231231
async init(): Promise<void> {
232-
await this.execGit(['init', this.workingDirectory])
232+
await this.execGit([
233+
'init',
234+
'--initial-branch=silence_warning_about_default_branch',
235+
this.workingDirectory
236+
])
233237
}
234238

235239
async isDetached(): Promise<boolean> {

0 commit comments

Comments
 (0)