Add utility methods for getting git info

Closes #314