reduce duplication in GitHelper