/** * Run a git command with array-based arguments (no shell interpolation). * This prevents command injection via commit messages, branch names, etc. */ export declare function git(args: string[], cwd: string): string; /** * Run a gh CLI command with array-based arguments (no shell interpolation). */ export declare function gh(args: string[], cwd: string): string; export declare function resolveRepo(input: string): string; /** Detect the default branch name for the repo (main, master, etc.). */ export declare function getDefaultBranch(cwd: string): string; export declare function createBranch(name: string, base: string, cwd: string): string; export declare function squashMerge(source: string, target: string, message: string, cwd: string): void; export declare function getDiff(cwd: string): string; export declare function getStagedDiff(cwd: string): string; export declare function commitAll(message: string, cwd: string): void; export declare function pushBranch(branch: string, cwd: string): void; export declare function createPR(title: string, body: string, base: string, head: string, cwd: string): string; /** Check whether `dir` is inside a git working tree. */ export declare function isGitRepo(dir: string): boolean; /** Return the git working-tree root for `dir`. */ export declare function getRepoRoot(dir: string): string; /** Derive an owner/repo slug from the origin remote URL. */ export declare function repoFromRemote(dir: string): string | null; /** Delete branches matching a pattern (for cleanup). */ export declare function deleteBranches(pattern: string, cwd: string): void; export declare function cloneOrLocateRepo(repo: string, defaultBranch?: string): string; export interface WorktreeInfo { path: string; branch: string; commit: string; } /** Create a git worktree with a new branch based on the given base branch. */ export declare function addWorktree(worktreePath: string, branchName: string, baseBranch: string, cwd: string): void; /** Remove a git worktree and prune stale entries. */ export declare function removeWorktree(worktreePath: string, cwd: string): void; /** List all worktrees for a repository. */ export declare function listWorktrees(cwd: string): WorktreeInfo[]; /** Remove all worktrees whose paths start with a given prefix. */ export declare function cleanupWorktrees(pathPrefix: string, cwd: string): void; //# sourceMappingURL=git.d.ts.map