Clone git repo with branch if specified instead of checkout