/** * 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): Promise; /** * Fetches and checks out a branch from origin. Throws on failure. */ export declare function checkoutBranch(cwd: string, branch: string): void; export declare function materializePullRequestBase(projectCwd: string, targetCwd: string, baseBranch: string): string; /** * Throws on failure. */ export declare function pushBranch(cwd: string, branch: string): void; export declare function publishTaskBranch(cloneCwd: string, projectCwd: 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 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