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
| Parameter | Type |
|---|---|
gitRepositoryPath | string |
Returns
Promise<string>
isGitDirectoryClean()
function isGitDirectoryClean(directoryPath): Promise<boolean>;
Defined in: functions/git.ts:26
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
| Parameter | Type |
|---|---|
directoryPath | string |
Returns
Promise<boolean>
Throws
If the provided directory is not inside of a Git repository.
isGitRepository()
function isGitRepository(gitRepositoryPath): Promise<boolean>;
Defined in: functions/git.ts:43
Helper function to determine whether the given path is inside of a Git repository.
Parameters
| Parameter | Type |
|---|---|
gitRepositoryPath | string |
Returns
Promise<boolean>
isGitRepositoryLatestCommit()
function isGitRepositoryLatestCommit(gitRepositoryPath): Promise<boolean>;
Defined in: functions/git.ts:52
Helper function to determine whether the given Git repository is up to date with the remote.
Parameters
| Parameter | Type |
|---|---|
gitRepositoryPath | string |
Returns
Promise<boolean>