Skip to main content

Git

Helper functions for working with Git.

Functions

getGitBranch()

function getGitBranch(gitRepositoryPath): Promise<string>;

Defined in: functions/git.ts:10

Helper function to get the current branch for a Git repository.

Parameters

ParameterType
gitRepositoryPathstring

Returns

Promise<string>


isGitRepository()

function isGitRepository(gitRepositoryPath): Promise<boolean>;

Defined in: functions/git.ts:18

Helper function to determine whether the given path is inside of a Git repository.

Parameters

ParameterType
gitRepositoryPathstring

Returns

Promise<boolean>


isGitRepositoryClean()

function isGitRepositoryClean(gitRepositoryPath): Promise<boolean>;

Defined in: functions/git.ts:30

Helper function to determine whether the given Git repository is "clean", meaning has no unchanged files from the head.

Parameters

ParameterType
gitRepositoryPathstring

Returns

Promise<boolean>


isGitRepositoryLatestCommit()

function isGitRepositoryLatestCommit(gitRepositoryPath): Promise<boolean>;

Defined in: functions/git.ts:39

Helper function to determine whether the given Git repository is up to date with the remote.

Parameters

ParameterType
gitRepositoryPathstring

Returns

Promise<boolean>