Swap out git CLI for go-git
There's an indirect requirement for the git CLI to be installed and in the $PATH for Gilt to work at all. It's also an unspoken requirement for the git to be 2.20 or newer (that isn't a high bar to clear, newer versions than that are even in Debian LTS)
go-git supports bare clones, and has enough worktree support for what Gilt is trying to get done, so it could be folded in and Gilt could handle everything on its own.
This is unfortunately blocked on a lack of support for partial clones in go-git: https://github.com/go-git/go-git/issues/1381
This looks promising: https://github.com/go-git/go-git/pull/1000
Stale issue message
The required feature set is allegedly targeted for their v6.0.0 release.
Adding myself as I also need this