Issue evidence · Launch · PrefectHQ/prefect

Pinned commit_sha not checked out when the git checkout already exists

GitHub issue: https://github.com/PrefectHQ/prefect/issues/23370

Reproduced

GitRepository(commit_sha=...) does not move an existing checkout to a new commit.

What Badgr ran

Ran the issue's self-contained script on Prefect 3.8.8: pull commit A, then pull commit B into the same directory.

What came back

  • After pulling A: HEAD == A.
  • After pulling B: HEAD is still A and the file reads 'A'.
  • is_current_commit() returned True for a SHA that does not exist.

Checked 2026-10-11 in Badgr’s local development environment.

← All issue evidence