Deuteronomy 20: The Lord tells the Israelites that they don't have to be afraid of their enemies, cuz He's got their back. He tells them to appoint officers to lead their armies into battle, and if they're worried about being outnumbered, He'll make sure they win. Then, He goes into some detail about who's allowed to fight and who isn't. Apparently, if you're scared, you can go home, and your brothers will have to pick up your slack. If you're fighting a city, you can offer it terms of surrender and if they accept, you can take its goods as loot. But, if they don't, then you just have to kill everyone and burn the city down. So, basically, the Lord's rules for war are: don't be scared, obey orders, be ready to kill, and if you can, try to take the city without killing everyone.