God's people sometimes commited genocide.
The LORD our God delivered him before us; and we smote him, and his sons, and all his people. And we took all his cities at that time, and utterly destroyed the men, and the women, and the little ones, of every city, we left none to remain. Deuteronomy 2:33-34
So the LORD our God delivered into our hands Og ... and we smote him until none was left to him remaining ... from threescore cities ... And we utterly destroyed them, ... utterly destroying the men, women, and children, of every city. Deuteronomy 3:3-6
And they utterly destroyed all that was in the city, both man and woman, young and old, and ox, and sheep, and ass, with the edge of the sword. Joshua 6:21
Sometimes God commanded them to.
And when the LORD thy God shall deliver them before thee; thou shalt smite them, and utterly destroy them; thou shalt make no covenant with them, nor shew mercy unto them. Deuteronomy 7:2
And thou shalt consume all the people which the LORD thy God shall deliver thee; thine eye shall have no pity upon them. Deuteronomy 7:16
Thou shalt surely smite the inhabitants of that city with the edge of the sword, destroying it utterly, and all that is therein, and the cattle thereof, with the edge of the sword. Deuteronomy 13:15
But of the cities of these people, which the LORD thy God doth give thee for an inheritance, thou shalt save alive nothing that breatheth. Deuteronomy 20:16-17
So smote all the country ... he left none remaining, but utterly destroyed all that breathed, as the LORD God of Israel commanded. Joshua 10:40
Thus saith the LORD of hosts ... go and smite Amalek, and utterly destroy all that they have, and spare them not; but slay both man and woman, infant and suckling, ox and sheep, camel and ass. 1 Samuel 15:2-3