Execute a Git command.
public execute ( array $args, string | false $dir = null, boolean $mustRun = false, boolean $quiet = true ) : string | boolean | ||
$args | array | Command arguments (everything after 'git'). |
$dir | string | false | The path to a Git repository. Set to false if the command should not run inside a repository. |
$mustRun | boolean | Enable exceptions if the Git command fails. |
$quiet | boolean | Suppress command output. |
return | string | boolean | The command output, true if there is no output, or false if the command fails. |