Though God never did, there are several Biblical accounts where the authors thought that God did. And as both the Biblical and historical account of ancient Israel shows, this mistake came at a great price.
Leaving the slavery issue out for a moment (but I will return to it in the end and explain why), there are very clear statements made by several of the Israelites regarding their conquest of the land of Canaan. While the Exodus account is not considered to be historical even by mainstream Christianity (Fundamentalists have a different view), its narrative device of folklore does seem to match what is historically known about this nation, its relationship to Egypt, and an actual exodus of slaves that, while not taking place in one fell swoop as the Scriptural account reads, did happen in stages as Egypt began to lose its grip as a world power to Assyria.
Apparently, prior to the return of the nation from its captivity to Babylon, the Israelites went from thinking it impossible to gain control of a land which they believed had been promised to their patriarch Abraham to being so haughty about it that they their violent genocide of men, women, and even children in the Fertile Crescent was ascribed to the God of the Hebrews. From the books of Joshua through the account of Kings one can read this in countless places.
Something happened which the Bible seems silent about after the Babylonian exile and destruction of the Temple in Jerusalem by Nebuchadnezzar. Upon returning to Palestine, the Jews never took the same view again. Sure, the Maqabim (Maccabees) did rise to fight at one point after their return, but it was a defensive position. One never reads such things as writers putting their words or views into God's mouth.
It seems that, while the books of prophecy that deal with the warnings of the Babylon invasion and the reasons for it mention the Jews as being greatly blood-guilty, it tends to at times lack a specific reason why. It is a hypothetical stand among some that such references have to deal with these things they did. Some of the details in the prophetic warnings also mention sexual sins, and while it is not clear if this has to do with what some see in the Mosaic Law as a condoning of rape, it is apparent that some forms of sexual practice which involved victimization was also included.
Not to be viewed as an excuse, mind you, but as a lesson that the Jews obviously had not fully grasped by the first century, it is interesting that this is not covered up at all. As exegete Father Oscar Lukefakr, C.M. explains that only with a Christocentric hermeneutical approach can critical analysis prove efficacious in understanding such passages: "It is not likely that God actually commanded Old Testament military leaders to slaughter every man, woman, and innocent child in the cities they overran. It is far more likely that these leaders mistakenly believed God to behind their directives and that their erroneous attitudes are reported as they perceived them."
This is what is referred to in exegetical approaches as cases of "imperfect" or "incomplete" theology. Revelation is a learning process, occurring over centuries, and it takes humans a long time to shed their current views of their Creator for the actual ones which represent him. Until history ends, all Christian understanding of God remains "imperfect" to the degree that so much is still not understood. In the Old Testament times this clearly included such incorrect attribution of criminal slaughter to God.
As for slaves, that was somewhat different than the slave trade of modern times. Time and space do not permit me to explain fully, but in that culture slaves were often loved as members of the family and even stood in line to inherit in place of firstborn sons. Because of the loyalty and care and emotional ties in this type of slaver/master arrangement, the Mosaic Law even had a means for a slave to remain eternally in their position should they love their master too much to leave (every 50 years all slaves had to be freed). And it is this loving "slave/master" model that was involved with a Roman centurion who begged Jesus to heal his dying servant, as well as being the language used for Jesus relationship to the Father, as well as Christians' relationship to Jesus. It has little to do with the evil slave trade that treated people as not even human that occurred in our modern era.