Skip to content

Commit

Permalink
fix: url now set correctly (#26)
Browse files Browse the repository at this point in the history
* added push as well, in the order of main then develop

Closes #24
  • Loading branch information
Bugs5382 committed Jan 1, 2024
2 parents 21f046d + c78058e commit 9f5f111
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export async function init (folder: string, step: string): Promise<void> {
await execFile('git', ['switch', '--orphan', 'main'], { cwd: folder })
await execFile('git', ['commit', '--allow-empty', '-m', '"chore: initial creation [ci skip]"'], { cwd: folder })
await execFile('git', ['checkout', 'develop'], { cwd: folder })
await execFile('git', ['-u', 'origin', 'main', 'develop'])
break
}
}
Expand All @@ -45,7 +46,7 @@ export async function addRemote (folder: string, repoOwner: string, repoName: st
} catch {
await execFile(
'git',
['remote', 'add', 'origin', `git@github.com:${repoOwner}/${repoName}.git`],
['remote', 'add', 'origin', `https://github.com/${repoOwner}/${repoName}.git`],
{ cwd: folder }
)
}
Expand Down

0 comments on commit 9f5f111

Please sign in to comment.