#27305 Better error reporting around git

This minor tweak adds better error reporting when git is missing from the system or when a git command fails.