/** * Get the name of the currently checked-out branch. */ export declare function getCurrentBranch(cwd: string): Promise; /** * Create a new branch and check it out. */ export declare function createBranch(cwd: string, name: string): Promise; /** * Stage all changes and create a commit. * * @returns The short hash of the new commit. */ export declare function commitAll(cwd: string, message: string): Promise; /** * Get a list of files changed since a given ref (defaults to HEAD). * * Returns relative paths as reported by git. */ export declare function getChangedFiles(cwd: string, since?: string): Promise; /** * Get the unified diff since a given ref (defaults to HEAD). */ export declare function getDiff(cwd: string, since?: string): Promise; /** * Check whether the working tree has uncommitted changes (staged or unstaged). */ export declare function hasUncommittedChanges(cwd: string): Promise; /** * Add a new git worktree at the given path on a new branch. * * Shells out to: git worktree add -b [] * Throws on non-zero exit (a failed worktree-add must surface as an error). */ export declare function addWorktree(projectRoot: string, worktreePath: string, branch: string, baseBranch?: string): Promise; /** * Remove a git worktree by path. * * Shells out to: git worktree remove [-f] * Uses reject: false so that removing a worktree that no longer exists * does not crash cleanup paths. */ export declare function removeWorktree(projectRoot: string, worktreePath: string, force?: boolean): Promise; /** * Check whether the working tree is clean (no staged or unstaged changes). * * Returns { clean: true, dirtyFiles: [] } when the tree is clean. * Returns { clean: false, dirtyFiles: [...] } listing each dirty path * (parsed from `git status --porcelain` — columns 0-1 are the XY status * codes, column 2 is a space, then the path starts at column 3). */ export declare function isClean(cwd: string): Promise<{ clean: boolean; dirtyFiles: string[]; }>; //# sourceMappingURL=git.d.ts.map