Apologetics Class: Did God Command Genocide?

The Israelites sure seemed to engage in a lot of battles, and the commands came straight from God, including orders to wipe out every man, woman, and child. Did God command his people to commit genocide?