Analysis of information sources in references of the Wikipedia article "Gopa (caste)" in Simple English language version.
The Yadavas of the Mahabharata period were known to be the followers of Vaisnavism, of which Krsna was the leader: they were gopas (cowherd) by profession, but at the same time they held the status of the Ksatriyas, participating in the battle of Kurukshetra. The present Ahirs are also followers of Vaisnavism.
The fact that the Yadavas were pastoral in their habits is distinctly proved by the fact that Krishna's sister Subhadra when she was taken away by Arjuna is described as having put on the dress of a Gopi or female cowherd. It is impossible to explain this fact unless we believe that the whole tribe was accustomed to use this dress. The freedom with which she and other Yadava women are described as moving on the Raivataka hill in the festivities on that occasion also shows that their social relations were freer and more unhampered than among the other Kshatriyas. Krishna again when he went over to Arjuna's side is said in the Mahabharata to have given in balance for that act an army of Gopas to Duryodhana. The Gopas could have been no other than the Yadavas themselves.
The Narayani Army which he organized, and which made him so powerful that his friendship was eagerly sought by the greatest kings of his time, is described in the Mahabharat as being all of the Abhira caste.