As detailed in How can I find out what version of git I'm running? you can get the git version via
$ git version
git version 2.30.0
But it looks like this is meant to be consumed by humans, not programs. Is that correct? If so is there a "plumbing" git version
command that can be used for numerical comparisons of the version?