Skip to content

Commit 401851f

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

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
@@ -670,7 +670,11 @@ class GitCommandManager {
670670
}
671671
init() {
672672
return __awaiter(this, void 0, void 0, function* () {
673-
yield this.execGit(['init', this.workingDirectory]);
673+
yield this.execGit([
674+
'init',
675+
'--initial-branch=silence_warning_about_default_branch',
676+
this.workingDirectory
677+
]);
674678
});
675679
}
676680
isDetached() {

src/git-command-manager.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,11 @@ class GitCommandManager {
263263
}
264264

265265
async init(): Promise<void> {
266-
await this.execGit(['init', this.workingDirectory])
266+
await this.execGit([
267+
'init',
268+
'--initial-branch=silence_warning_about_default_branch',
269+
this.workingDirectory
270+
])
267271
}
268272

269273
async isDetached(): Promise<boolean> {

0 commit comments

Comments
 (0)