Fix crash in git checkout (#33499)

Closes #33438

Release Notes:

- git: Use git cli to perform checkouts (to avoid a crash seen in
libgit2)
d74f3f4ea6Conrad Irwin committed on 6/27/2025, 3:16:15 PM· committed by GitHubparent9e2023b
1 file changedLine totals unavailable