Skip to main content

reset_start_commit

Function reset_start_commit 

Source
pub fn reset_start_commit() -> Result<ResetStartCommitResult>
Expand description

Reset the starting commit to merge-base with the default branch.

This is a CLI command that updates .agent/start_commit to the merge-base between HEAD and the default branch (main/master). This provides a better baseline for feature branch workflows, showing only changes since branching.

If the current branch is main/master itself, falls back to current HEAD.

ยงErrors

Returns an error if:

  • The current HEAD cannot be determined
  • The default branch cannot be found
  • No common ancestor exists between HEAD and the default branch
  • The file cannot be written