add if test to either clone or checkout git projects