/**
 * Branch Manager
 *
 * Handles git branch operations for autofix PRs.
 * Uses cross-spawn with array args per CLAUDE.md guidelines.
 *
 * @module autofix/branch-manager
 */
import type { GitResult, BranchInfo } from "./types.js";
/**
 * Execute a git command and return the result
 */
export declare function git(args: string[], options?: {
    cwd: string;
    timeout?: number;
}): Promise<GitResult>;
/**
 * Check if git is available
 */
export declare function isGitAvailable(cwd: string): Promise<boolean>;
/**
 * Check if directory is a git repository
 */
export declare function isGitRepo(cwd: string): Promise<boolean>;
/**
 * Get the current branch name
 */
export declare function getCurrentBranch(cwd: string): Promise<string | undefined>;
/**
 * Get the default branch name (main or master)
 */
export declare function getDefaultBranch(cwd: string): Promise<string>;
/**
 * Check if a branch exists locally
 */
export declare function branchExists(cwd: string, branchName: string): Promise<boolean>;
/**
 * Check if a branch exists on remote
 */
export declare function remoteBranchExists(cwd: string, branchName: string, remote?: string): Promise<boolean>;
/**
 * Create a new branch from a base
 */
export declare function createBranch(cwd: string, branchName: string, baseBranch: string): Promise<GitResult>;
/**
 * Switch to an existing branch
 */
export declare function checkoutBranch(cwd: string, branchName: string): Promise<GitResult>;
/**
 * Delete a local branch
 */
export declare function deleteBranch(cwd: string, branchName: string, force?: boolean): Promise<GitResult>;
/**
 * Stage specific files
 */
export declare function stageFiles(cwd: string, files: string[]): Promise<GitResult>;
/**
 * Get list of modified files (staged and unstaged)
 */
export declare function getModifiedFiles(cwd: string): Promise<string[]>;
/**
 * Get list of staged files
 */
export declare function getStagedFiles(cwd: string): Promise<string[]>;
/**
 * Check if working tree is clean
 */
export declare function isWorkingTreeClean(cwd: string): Promise<boolean>;
/**
 * Push branch to remote
 */
export declare function pushBranch(cwd: string, branchName: string, remote?: string, setUpstream?: boolean): Promise<GitResult>;
/**
 * Stash current changes
 */
export declare function stash(cwd: string, message?: string): Promise<GitResult>;
/**
 * Pop stashed changes
 */
export declare function stashPop(cwd: string): Promise<GitResult>;
/**
 * Get branch info including tracking
 */
export declare function getBranchInfo(cwd: string, branchName?: string): Promise<BranchInfo | undefined>;
/**
 * Reset branch to a specific commit
 */
export declare function resetToCommit(cwd: string, commitish: string, mode?: "soft" | "mixed" | "hard"): Promise<GitResult>;
/**
 * Get the remote URL for origin
 */
export declare function getRemoteUrl(cwd: string, remote?: string): Promise<string | undefined>;
/**
 * Parse GitHub owner/repo from remote URL
 */
export declare function parseGitHubRemote(url: string): {
    owner: string;
    repo: string;
} | undefined;
/**
 * Generate a unique branch name
 */
export declare function generateBranchName(prefix: string, identifier: string): string;
/**
 * Ensure we're on a clean working tree before operations
 */
export declare function ensureCleanWorkingTree(cwd: string, stashIfDirty?: boolean): Promise<{
    clean: boolean;
    stashed: boolean;
}>;
/**
 * Restore original branch state after operations
 */
export declare function restoreOriginalState(cwd: string, originalBranch: string, wasStashed: boolean): Promise<void>;
//# sourceMappingURL=branch-manager.d.ts.map