When you go to war against your enemy and see horses and chariots and soldiers far outnumbering you, do not recoil in fear of them; God, your God, who brought you up out of Egypt is with you.
When the battle is about to begin, let the priest come forward and speak to the troops.
He'll say, "Attention, Israel. In a few minutes you're going to do battle with your enemies. Don't waver in resolve. Don't fear. Don't hesitate. Don't panic.
God, your God, is right there with you, fighting with you against your enemies, fighting to win."
Then let the officers step up and speak to the troops: "Is there a man here who has built a new house but hasn't yet dedicated it? Let him go home right now lest he die in battle and another man dedicate it.
And is there a man here who has planted a vineyard but hasn't yet enjoyed the grapes? Let him go home right now lest he die in battle and another man enjoy the grapes.
Is there a man here engaged to marry who hasn't yet taken his wife? Let him go home right now lest he die in battle and another man take her."
The officers will then continue, "And is there a man here who is wavering in resolve and afraid? Let him go home right now so that he doesn't infect his fellows with his timidity and cowardly spirit."
When the officers have finished speaking to the troops, let them appoint commanders of the troops who shall muster them by units.
When you come up against a city to attack it, call out, "Peace?"
If they answer, "Yes, peace!" and open the city to you, then everyone found there will be conscripted as forced laborers and work for you.
But if they don't settle for peace and insist on war, then go ahead and attack.
God, your God, will give them to you. Kill all the men with your swords.
But don't kill the women and children and animals. Everything inside the town you can take as plunder for you to use and eat - God, your God, gives it to you.
This is the way you deal with the distant towns, the towns that don't belong to the nations at hand.
But with the towns of the people that God, your God, is giving you as an inheritance, it's different: don't leave anyone alive.
Consign them to holy destruction: the Hittites, Amorites, Canaanites, Perizzites, Hivites, and Jebusites, obeying the command of God, your God.
This is so there won't be any of them left to teach you to practice the abominations that they engage in with their gods and you end up sinning against God, your God.
When you mount an attack on a town and the siege goes on a long time, don't start cutting down the trees, swinging your axes against them. Those trees are your future food; don't cut them down. Are trees soldiers who come against you with weapons?
The exception can be those trees which don't produce food; you can chop them down and use the timbers to build siege engines against the town that is resisting you until it falls.