git commit with common commit message when omit.
14519
def commit(message=COMMON_COMMIT_MESSAGE, capture=True):
    
    env.warn_only = True
    local(u'git commit -am"{}"'.format(message))
110222
def merge_commit(commit):
    ""
    with cd(env.path):
        run('git fetch')
        if '@' in commit:
            branch, commit = commit.split('@')
            run('git checkout {0}'.format(branch))
        run('git merge {0}'.format(commit))
85450
function git(args) {
  return new Promise((resolve, reject) => {
    exec(`git ${args}`, (err, stdout) => {
      if (err) {
        reject(err);
      } else {
        resolve(stdout.trim());
      }
    });
  });
}
541073
private boolean executeGitHasUncommitted() throws MojoFailureException,
            CommandLineException {
        boolean uncommited = false;

        // 1 if there were differences and 0 means no differences

        // git diff --no-ext-diff --ignore-submodules --quiet --exit-code
        final CommandResult diffCommandResult = executeGitCommandExitCode(
                "diff", "--no-ext-diff", "--ignore-submodules", "--quiet",
                "--exit-code");

        String error = null;

        if (diffCommandResult.getExitCode() == SUCCESS_EXIT_CODE) {
            // git diff-index --cached --quiet --ignore-submodules HEAD --
            final CommandResult diffIndexCommandResult = executeGitCommandExitCode(
                    "diff-index", "--cached", "--quiet", "--ignore-submodules",
                    "HEAD", "--");
            if (diffIndexCommandResult.getExitCode() != SUCCESS_EXIT_CODE) {
                error = diffIndexCommandResult.getError();
                uncommited = true;
            }
        } else {
            error = diffCommandResult.getError();
            uncommited = true;
        }

        if (StringUtils.isNotBlank(error)) {
            throw new MojoFailureException(error);
        }

        return uncommited;
    }
1138361
def commit(self, message=None):
        

        flags = filters.Items()

        if self._status:
            flags.add_flags(self._status)

        if self._code_review is not None:
            flags.add_flags("code-review %s" % self._code_review)

        if self._verified is not None:
            flags.add_flags("verified %s" % self._verified)

        if message:
            flags.add_flags("message '%s'" % message)

        query = ['gerrit', 'review', str(flags), str(self._review)]

        results = self.client.exec_command(' '.join(query))
        stdin, stdout, stderr = results

        # NOTE(flaper87): Log error messages
        error = []
        for line in stderr:
            error.append(line)

        # True if success
        return not error
251534
def commit(self, rev=None):
        """"""
        if rev is None:
            return self.head.commit
        else:
            return self.rev_parse(text_type(rev) + "^0")
1350354
def commit(message, add=False, quiet=False):
    
    if add:
        run('add .')
    try:
        stdout = run('commit -m %r' % str(message), quiet=quiet)
    except GitError as e:
        s = str(e)
        if 'nothing to commit' in s or 'no changes added to commit' in s:
            raise EmptyCommit(*e.inits())
        raise
    return re.split('[ \]]', stdout.splitlines()[0])[1]
884427
def git_commit(targets, message, force=False, sign=False):
    
    root = get_root()
    target_paths = []
    for t in targets:
        target_paths.append(os.path.join(root, t))

    with chdir(root):
        result = run_command('git add{} {}'.format(' -f' if force else '', ' '.join(target_paths)))
        if result.code != 0:
            return result

        return run_command('git commit{} -m "{}"'.format(' -S' if sign else '', message))
629256
function gitCommit () {
      var message = options.message
        .replace(/%sourceName%/g, tokens.name)
        .replace(/%sourceCommit%/g, tokens.commit)
        .replace(/%sourceBranch%/g, tokens.branch);

      // If there are no changes, skip commit
      if (shelljs.exec('git status --porcelain', {silent: true}).output === '') {
        log.subhead('No changes to your branch. Skipping commit.');
        return;
      }

      log.subhead('Committing changes to "' + options.branch + '".');
      execWrap('git add -A .');

      // generate commit message
      var commitFile = 'commitFile-' + crypto.createHash('md5').update(message).digest('hex').substring(0, 6);
      fs.writeFileSync(commitFile, message);

      execWrap('git commit --file=' + commitFile);

      fs.unlinkSync(commitFile);
    }
257257
def git_check():
    """"""
    git_status = subprocess.check_output(['git', 'status', '--porcelain'])
    if len(git_status) is 0:
        print(Fore.GREEN + 'All changes committed' + Style.RESET_ALL)
    else:
        exit(Fore.RED + 'Please commit all files to continue')
436884
function commit(result) {
  var url = result.html_url
  //user opted not to commit anything
  if (argv.b || argv.bare) {
    return Promise.resolve(url)
  }
  return getMessage().then(function(message) {
    return gitCommit({
      message: message,
      url: url + '.git'
    }).catch(function() {
      console.warn(chalk.dim("git commands ignored"))
      return Promise.resolve(url)
    }).then(function() {
      return url
    })
  })
}
41795
function commitChanges(git, version) {
    git += `git commit -m "chore: updated npm version to ${version}" && git push`;
    exec(git, (err, stdout, stderr) => {
      if (err) {
        throw new Error(
          "BRANCH SDK: Failed to commit git changes for the npm version. Docs https://goo.gl/GijGKP"
        );
      }
    });
  }
269331
def commit_update():
    
    unused = _find_unused_partition()
    new = _switch_partition()
    if new != unused:
        msg = f"Bad switch: switched to {new} when {unused} was unused"
        LOG.error(msg)
        raise RuntimeError(msg)
    else:
        LOG.info(f'commit_update: committed to booting {new}')
819583
def commit_msg_hook(argv):
    """"""
    with open(argv[1], "r", "utf-8") as fh:
        message = "\n".join(filter(lambda x: not x.startswith("#"),
                                   fh.readlines()))
    options = {"allow_empty": True}

    if not _check_message(message, options):
        click.echo(
            "Aborting commit due to commit message errors (override with "
            "'git commit --no-verify').", file=sys.stderr)
        raise click.Abort
    return 0
299332
def commit_config(self, message=""):
        """"""
        commit_args = {"comment": message} if message else {}
        self.device.cu.commit(ignore_warning=self.ignore_warning, **commit_args)
        if not self.lock_disable and not self.session_config_lock:
            self._unlock()
1204535
public RevCommit addAndCommit(Git git, String message) {
        try {
            git.add()
                .addFilepattern(".")
                .call();
            return git.commit()
                .setMessage(message)
                .call();
        } catch (GitAPIException e) {
            throw new IllegalStateException(e);
        }
    }
752790
def from_full_message(commit_msg_str):
        
        all_lines = commit_msg_str.splitlines()
        try:
            cutline_index = all_lines.index(GitCommitMessage.CUTLINE)
        except ValueError:
            cutline_index = None
        lines = [line for line in all_lines[:cutline_index] if not line.startswith(GitCommitMessage.COMMENT_CHAR)]
        full = "\n".join(lines)
        title = lines[0] if lines else ""
        body = lines[1:] if len(lines) > 1 else []
        return GitCommitMessage(original=commit_msg_str, full=full, title=title, body=body)