Add funciton to retrieve the git version of a repo.