Skip to content

@saflib/git


Function: currentBranch() ​

currentBranch(repoRoot): ReturnsError<null | string, GitCommandError>>

Short name of the branch HEAD points at (e.g. main), or null when detached.

Parameters ​

ParameterType
repoRootstring

Returns ​

ReturnsError<null | string, GitCommandError>