export type GitRunResult = {
    ok: boolean;
    stdout: string;
    stderr: string;
    status: number | null;
};
export declare function runGit(cwd: string, argv: string[]): GitRunResult;
export declare function isGitRepository(cwd: string): boolean;
/** Resolve a local or remote-tracking ref for the canonical task-state branch. */
export declare function resolveTaskStateGitRef(cwd: string, branch?: string): {
    ref: string;
    tipSha: string;
} | {
    missing: true;
    tried: string[];
};
export declare function remoteBranchHeadSha(cwd: string, branch: string, remote?: string): string | null;
export declare function gitFetchTaskStateBranch(cwd: string, branch?: string): GitRunResult;
export declare function gitShowText(cwd: string, ref: string, filePath: string): string | null;
export declare function gitLsTreeNames(cwd: string, ref: string, treePath: string): string[];
export declare function removeGitWorktree(repoCwd: string, worktreePath: string): GitRunResult;
