diff --git a/codex-rs/utils/git/src/ghost_commits.rs b/codex-rs/utils/git/src/ghost_commits.rs index 1fd4dc3d7d..7fdc16e69c 100644 --- a/codex-rs/utils/git/src/ghost_commits.rs +++ b/codex-rs/utils/git/src/ghost_commits.rs @@ -320,6 +320,7 @@ fn restore_to_commit_inner( OsString::from("restore"), OsString::from("--source"), OsString::from(commit_id), + OsString::from("--staged"), OsString::from("--worktree"), OsString::from("--"), ];