Get the upstream for a branch.
public getUpstream ( string $branch = null, string | null $dir = null, boolean $mustRun = false ) : string | false | ||
$branch | string | The name of the branch to get the upstream for. Defaults to the current branch. |
$dir | string | null | The path to a Git repository. |
$mustRun | boolean | Enable exceptions if the Git command fails. |
return | string | false | The upstream, in the form remote/branch, or false if no upstream is found. |