Skip to content

Commit

Permalink
v0.2 tweaks
Browse files Browse the repository at this point in the history
* Init with "main" branch
  • Loading branch information
Eccenux committed Jul 13, 2023
1 parent 55fdd26 commit 536c45a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/GitOps.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export default class GitOps {
this.repoName = repoName;
/** Fake domain for e-mails. */
this.fakeDomain = 'fake.wikipedia.org';
/** Default branch. */
this.branch = 'main';
}

set baseDir(dir) {
Expand All @@ -41,7 +43,7 @@ export default class GitOps {

/** Create repo. */
async create() {
const result = await this.exec(`git init ${this.repoName}`, this.baseDir);
const result = await this.exec(`git init ${this.repoName} -b ${this.branch}`, this.baseDir);
if (!result) {
throw 'Unable to create repo!';
}
Expand Down

0 comments on commit 536c45a

Please sign in to comment.