A branch reference like upstream/master
or origin/master
.
First param: branch
. Second param: cwd
. See GetDefaultRemoteBranchOptions for more info.
(This had to be changed to ...args
to avoid a conflict with the object param version.)
Rest
...args: string[]Use the object param version
Generated using TypeDoc
Gets a reference to
options.branch
or the default branch relative to the default remote. (See getDefaultRemote for how the default remote is determined.) Throws ifoptions.cwd
is not in a git repo or there's no package.json at the repo root.