Skip to content

Git

Helper functions for working with Git.

function getGitBranchName(gitRepositoryPath): Promise<string>;

Defined in: functions/git.ts:10

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

Parameter Type
gitRepositoryPath string

Promise<string>


function isGitDirectoryClean(directoryPath): Promise<boolean>;

Defined in: functions/git.ts:28

Helper function to determine whether the given directory inside of a Git repository is “clean”, meaning has no unchanged files from the head.

  • If given the root of a Git repository, it will check the entire repository.
  • If given a subdirectory of a Git repository, it will check for only changes in that directory.
Parameter Type
directoryPath string

Promise<boolean>

If the provided directory is not inside of a Git repository.


function isGitRepository(gitRepositoryPath): Promise<boolean>;

Defined in: functions/git.ts:45

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

Parameter Type
gitRepositoryPath string

Promise<boolean>


function isGitRepositoryLatestCommit(gitRepositoryPath): Promise<boolean>;

Defined in: functions/git.ts:54

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

Parameter Type
gitRepositoryPath string

Promise<boolean>