In the present study, different random regression models, focussed on the nature of the effect of the contemporary group, fixed or random, were compared for genetic evaluation of test-day milk yield in dairy Gir breed, whose herds are characterised by relatively reduced numbers of cows. Cows were assigned to the same contemporary group if they were tested in the same herd, year and month. In one of the evaluated models, the contemporary group was investigated as a fixed effect and a clustering procedure was adopted to group herd-year subclasses in order to, at the end of the process, all contemporary groups contained at least three cows. The models were compared by the quality of fit, the accuracy of the predicted breeding values and their estimates of genetic parameters. The clustering procedure did not significantly improve the accuracy of predicted breeding values. Moreover, the fit to the data for this model was negatively affected. Therefore, this strategy should not be further implemented. The model including the herd-calving period effect and contemporary group treated as random effect showed similar characteristics to its equivalent, where the contemporary group was modelled as a fixed effect. However, the fit to the data for this model was slightly worse. Thus, the results suggest a random regression model including the herd-calving period effect and the fixed effect of contemporary group for the genetic evaluations of production traits in dairy Gir cattle. These findings could be extended to small dairy cattle populations whose herds are small-sized.