/** * GitService - Unified git operations * * Provides git functionality for all Foundation modules: * - Worktree management (create, list, remove) * - Branch operations (create, switch, merge) * - Status, diff, log queries * - CLAUDE.md file operations */ export interface GitStatus { branch: string; ahead: number; behind: number; staged: string[]; modified: string[]; untracked: string[]; conflicts: string[]; } export interface GitLogEntry { hash: string; shortHash: string; author: string; date: string; message: string; } export interface GitWorktreeInfo { path: string; branch: string; head: string; bare: boolean; detached: boolean; locked: boolean; prunable: boolean; } export declare class GitService { private static instance; private constructor(); static getInstance(): GitService; /** * Check if a directory is inside a git repository */ isGitRepo(cwd?: string): Promise; /** * Get the root directory of the git repository */ getRepoRoot(cwd?: string): Promise; /** * Get the current branch name */ getCurrentBranch(cwd?: string): Promise; /** * Create a new git worktree */ createWorktree(path: string, branch: string, options?: { baseBranch?: string; cwd?: string; createBranch?: boolean; }): Promise; /** * List all worktrees */ listWorktrees(cwd?: string): Promise; /** * Remove a worktree */ removeWorktree(path: string, options?: { force?: boolean; cwd?: string; }): Promise; /** * Prune stale worktree references */ pruneWorktrees(cwd?: string): Promise; /** * Create a new branch */ createBranch(name: string, options?: { baseBranch?: string; cwd?: string; }): Promise; /** * Delete a branch */ deleteBranch(name: string, options?: { force?: boolean; cwd?: string; }): Promise; /** * Check if a branch exists */ branchExists(name: string, cwd?: string): Promise; /** * List all branches */ listBranches(cwd?: string): Promise; /** * Switch to a branch */ switchBranch(name: string, cwd?: string): Promise; /** * Merge a branch into the current branch */ mergeBranch(name: string, options?: { noFf?: boolean; message?: string; cwd?: string; }): Promise<{ success: boolean; conflicts: string[]; }>; /** * Get detailed git status */ getStatus(cwd?: string): Promise; /** * Get list of conflicted files */ getConflictedFiles(cwd?: string): Promise; /** * Get diff for a file or all changes */ getDiff(options?: { file?: string; staged?: boolean; cwd?: string; }): Promise; /** * Get git log */ getLog(options?: { count?: number; format?: string; cwd?: string; }): Promise; /** * Get path to CLAUDE.md in repo root */ getClaudeMdPath(cwd?: string): Promise; /** * Read CLAUDE.md content */ readClaudeMd(cwd?: string): Promise; /** * Write CLAUDE.md content */ writeClaudeMd(content: string, cwd?: string): Promise; /** * Stage files */ stageFiles(files: string[] | 'all', cwd?: string): Promise; /** * Commit staged changes */ commit(message: string, cwd?: string): Promise; /** * Abort a merge in progress */ abortMerge(cwd?: string): Promise; /** * Reset to a specific commit */ reset(target?: string, options?: { hard?: boolean; cwd?: string; }): Promise; /** * Check if there are uncommitted changes */ hasUncommittedChanges(cwd?: string): Promise; } //# sourceMappingURL=git.service.d.ts.map