Skip to main content

diff

client.git.diff(data?: GitDiffRequest): Promise<GitDiff[]>

Retrieves the current diff of changes in the working directory.

Compares the working tree against the latest commit to show all unstaged modifications. Optionally filters to a specific file path.

Parameters

ParameterTypeRequiredDescription
dataGitDiffRequestNoOptional filter parameters

Returns

Promise<GitDiff[]> — A promise that resolves to an array of objects with file changes and line modifications

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.git.diff();
console.log(result);