$ create-git --helpcreate-gitinitalize a git repoOptions: --help Show help [boolean] --version Show version number [boolean] --cwd, -d Directory to run in [default: process.cwd()] --primary-branch, -b Primary branch for repo [string] [default: main] --initial-commit-message, -m Message for initial commit [string] --remote-origin, -o Git remote origin [string] --ignore-templates, -t Ignore templates from github.com/github/gitignore [default: Node.gitignore] --additional-rules comma separated list of ignore lines [string] --ignore-existing Ignore existing .gitignore and package.json files [default: false] --commit-all Commit all files (not just the new .gitignore [boolean] [default: true] --push Push to remote origin when complete [boolean] [default: true]
Programmatic Usage
const createGit = require('create-git')await createGit({ primartBranch: 'main', ignoreExisting: false, initialCommitMessage: '', remoteOrigin: '', // Will also load from the package.json repository field ignoreTemplates: ['Node.gitignore'], additionalRules: [], push: true, commitAll: true})
Composition with other create-* packages
This generator is built on top of opta, a helper library for collecting
user input from multiple interfaces: CLI via yargs, interactive prompts via inquirer
and via a JS interface. To compose with other opta based input collection,
you can use .options to access the cli/prompt/js configurations.