Move method to git_repo to promote code reuse