src/commands.js
function commit(options) {
    assert.ok(options.message, 'message is mandatory');

    var args = [
      'commit',
      options.force ? '--amend' : null,
      options.noVerify ? '-n' : null,
      options.message ? '-m' : null,
      options.message ? options.message : null
    ];

    return git(args)
        .catch(passWarning)
        .then(silent);
  }
function commit(options) {
    assert.ok(options.message, 'message is mandatory');

    var args = [
      'commit',
      options.force ? '--amend' : null,
      options.noVerify ? '-n' : null,
      options.message ? '-m' : null,
      options.message ? options.message : null
    ];

    return git(args)
        .catch(passWarning)
        .then(silent);
  }
function commit ( options ) { assert . ok ( options . message , 'message is mandatory' ) ; var args = [ 'commit' , options . force ? '--amend' : null , options . noVerify ? '-n' : null , options . message ? '-m' : null , options . message ? options . message : null ] ; return git ( args ) . catch ( passWarning ) . then ( silent ) ; }
Commits the staging area
Executes `git commit -m "First commit"`

It does not fail when there is not anything to commit

@example
var git = require('gitftw');

git.commit({
message: 'First commit'
});

@memberof git
@type {command}

@param {Object} options The options object. All its properties are {@link Resolvable}
@param {Resolvable|String} options.message The commit message
@param {Resolvable|Boolean} [options.force] Replace the tip of the current branch by creating
a new commit. The --amend flag
@param {Resolvable|Boolean} [options.noVerify] This option bypasses the pre-commit
and commit-msg hooks
@param {callback} [cb] The execution callback result
@returns {Promise} Promise Resolves with undefined
Commits the staging area Executes git commit - m First commit