#27305 Better error reporting in conjunction with git commands

Adds better error reporting when git is missing from the system or when
a git command fails. Closes #116.
[minor] Improved docstrings.