Git
Helper functions for working with Git.
Functions
Section titled “Functions”getGitBranchName()
Section titled “getGitBranchName()”function getGitBranchName(gitRepositoryPath): Promise<string>;Defined in: functions/git.ts:10
Helper function to get the current branch name for a Git repository.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
gitRepositoryPath |
string |
Returns
Section titled “Returns”Promise<string>
isGitDirectoryClean()
Section titled “isGitDirectoryClean()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
directoryPath |
string |
Returns
Section titled “Returns”Promise<boolean>
Throws
Section titled “Throws”If the provided directory is not inside of a Git repository.
isGitRepository()
Section titled “isGitRepository()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
gitRepositoryPath |
string |
Returns
Section titled “Returns”Promise<boolean>
isGitRepositoryLatestCommit()
Section titled “isGitRepositoryLatestCommit()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
gitRepositoryPath |
string |
Returns
Section titled “Returns”Promise<boolean>
