Gush\Helper\GitHelper::commit PHP Method

commit() public method

public commit ( $message, array $options = [] )
$options array
    public function commit($message, array $options = [])
    {
        $params = '';
        foreach ($options as $option => $value) {
            if (is_int($option)) {
                $params[] = '-' . $value;
            } else {
                $params[] = '-' . $option;
                $params[] = $value;
            }
        }
        $tmpName = $this->filesystemHelper->newTempFilename();
        file_put_contents($tmpName, $message);
        $this->processHelper->runCommand(array_merge(['git', 'commit', '-F', $tmpName], $params));
    }