git-sync-js / init / IGitInitOptions
Interface: IGitInitOptions
init.IGitInitOptions
Table of contents
Properties
Properties
bare
• Optional
bare: boolean
Whether create a bare repo, useful as an upstream repo
Defined in
initialCommit
• Optional
initialCommit: boolean
Default to true, to try to fix https://stackoverflow.com/questions/12267912/git-error-fatal-ambiguous-argument-head-unknown-revision-or-path-not-in-the
Following techniques are not working:
await GitProcess.exec(['symbolic-ref', 'HEAD', `refs/heads/${branch}`], dir);
await GitProcess.exec(['checkout', `-b`, branch], dir);
This works: https://stackoverflow.com/a/51527691/4617295