/create-git

Node generator to setup git, a ,gitignore, origin and initial commits

Primary LanguageJavaScriptISC LicenseISC

Create Git Project

NPM Version NPM Downloads js-standard-style

A generator to initialize a project with git.

Features

  • Initalize git repo
  • Create .gitignore from templates
  • Setup a remote origin
  • Create first commit

Usage

$ npm init git

# or

$ npx create-git

# or

$ npm install -g create-git
$ create-git

CLI Usage

$ create-git --help
  Usage: create-git [options] <directory>

  Options:
    -V, --version                output the version number
    --silent                     Surpress output
    --no-prompt                  Skip prompts and just use input options
    --ignore-existing            Ignore existing package.json
    -m --initial-commit-message  The initial commit message
    -o --origin                  Set the remote origin
    -t --templates               Ignor templates to load
    -h, --help                   output usage information

Programmatic Usage

const createGit = require('create-git')

;(async () => {
  await createGit({
    ignoreExisting: false,
    initialCommitMessage: '',
    remoteOrigin: '',
    ignoreTemplates: ['Node.gitignore']
  })
})()