/**
 * Shared git operations for task execution
 */
export declare const NON_FAST_FORWARD_PUSH_HINT = "Push rejected (non-fast-forward): remote is ahead of this branch. Sync with origin (fetch/pull or reset to remote) or recreate the worktree from the remote tip; a stale local branch as the clone source often causes this.";
export interface StageAndCommitOptions {
    allowGitHooks?: boolean;
    allowGitFilters?: boolean;
}
export declare function getCurrentBranch(cwd: string): string;
/**
 * Returns the short commit hash if changes were committed, undefined if no changes.
 */
export declare function stageAndCommit(cwd: string, message: string, options?: StageAndCommitOptions): string | undefined;
/**
 * Fetches and checks out a branch from origin. Throws on failure.
 */
export declare function checkoutBranch(cwd: string, branch: string): void;
/**
 * Throws on failure.
 */
export declare function pushBranch(cwd: string, branch: string): void;
export declare function materializeCloneHeadToRootBranch(cloneCwd: string, rootCwd: string, branch: string): void;
/**
 * Relay push: fetches clone HEAD into a temporary ref in the root repo,
 * pushes that ref to origin, then cleans up the temp ref (always, even on failure).
 *
 * This avoids the unsafe `git push <projectDir> HEAD` pattern which can push
 * to a checked-out branch and cause data loss.
 */
export declare function pushHeadToOriginBranch(cwd: string, branch: string): void;
export declare function relayPushCloneToOrigin(cloneCwd: string, rootCwd: string, branch: string): void;
//# sourceMappingURL=git.d.ts.map