Deuteronomy 20:15-20

15 So thou dost do to all the cities which are very far off from thee, which are not of the cities of these nations.
16 `Only, of the cities of these peoples which Jehovah thy God is giving to thee [for] an inheritance, thou dost not keep alive any breathing;
17 for thou dost certainly devote the Hittite, and the Amorite, the Canaanite, and the Perizzite, the Hivite, and the Jebusite, as Jehovah thy God hath commanded thee,
18 so that they teach you not to do according to all their abominations which they have done to their gods, and ye have sinned against Jehovah your God.
19 `When thou layest siege unto a city many days, to fight against it, to capture it, thou dost not destroy its trees to force an axe against them, for of them thou dost eat, and them thou dost not cut down -- for man's [is] the tree of the field -- to go in at thy presence in the siege.
20 Only, the tree, which thou knowest that it [is] not a fruit-tree, it thou dost destroy, and hast cut down, and hast built a bulwark against the city which is making with thee war till thou hast subdued it.

Deuteronomy 20:15-20 Meaning and Commentary

INTRODUCTION TO DEUTERONOMY 20

In this chapter rules are given to be observed in times of war. When a battle was near, a priest was to address the soldiers, and encourage them to fight, De 20:1-4, then the officers were to declare who might return home, De 20:5-9 when an enemy's city was approached, peace was to be proclaimed on certain conditions, which, if accepted of, the inhabitants were to be tributaries and servants, but if not, when taken, all were to be put to the sword, excepting women, children, and cattle, De 20:10-15, but those of the seven nations were to be utterly destroyed, De 20:16-18, and, during a siege, no trees bearing fruit fit for food were to be cut down, De 20:19.

Young's Literal Translation is in the public domain.