Skip to main content

git

@codebolt/codeboltjs


Variable: git

const git: {
addAll: () => Promise<AddResponse>;
branch: (branch: string) => Promise<GitBranchResponse>;
checkout: (branch: string) => Promise<GitCheckoutResponse>;
clone: (url: string, path?: string) => Promise<GitCloneResponse>;
commit: (message: string) => Promise<GitCommitResponse>;
diff: (commitHash: string) => Promise<GitDiffResponse>;
init: (path: string) => Promise<GitInitResponse>;
logs: (path: string) => Promise<GitLogsResponse>;
pull: () => Promise<GitPullResponse>;
push: () => Promise<GitPushResponse>;
status: () => Promise<GitStatusResponse>;
};

Defined in: packages/codeboltjs/src/modules/git.ts:22

A service for interacting with Git operations via WebSocket messages.

Type Declaration

NameTypeDescriptionDefined in
addAll()() => Promise<AddResponse>Adds changes in the local repository to the staging area at the given path.packages/codeboltjs/src/modules/git.ts:87
branch()(branch: string) => Promise<GitBranchResponse>Creates a new branch in the local repository at the given path.packages/codeboltjs/src/modules/git.ts:133
checkout()(branch: string) => Promise<GitCheckoutResponse>Checks out a branch or commit in the local repository at the given path.packages/codeboltjs/src/modules/git.ts:117
clone()(url: string, path?: string) => Promise<GitCloneResponse>Clones a remote Git repository to the specified path.packages/codeboltjs/src/modules/git.ts:180
commit()(message: string) => Promise<GitCommitResponse>Commits the staged changes in the local repository with the given commit message.packages/codeboltjs/src/modules/git.ts:101
diff()(commitHash: string) => Promise<GitDiffResponse>Retrieves the diff of changes for a specific commit in the local repository.packages/codeboltjs/src/modules/git.ts:164
init()(path: string) => Promise<GitInitResponse>Initializes a new Git repository at the given path.packages/codeboltjs/src/modules/git.ts:28
logs()(path: string) => Promise<GitLogsResponse>Retrieves the commit logs for the local repository at the given path.packages/codeboltjs/src/modules/git.ts:148
pull()() => Promise<GitPullResponse>Pulls the latest changes from the remote repository to the local repository at the given path.packages/codeboltjs/src/modules/git.ts:44
push()() => Promise<GitPushResponse>Pushes local repository changes to the remote repository at the given path.packages/codeboltjs/src/modules/git.ts:58
status()() => Promise<GitStatusResponse>Retrieves the status of the local repository at the given path.packages/codeboltjs/src/modules/git.ts:73