John Gill's Bible Commentary Ver. 7. That ye come not among these nations, those that remain among you , etc.] That remained unsubdued, or that were suffered to dwell among them, being tributaries to them; with these they were not to converse freely and familiarly, nor to carry on trade and commerce with them, nor enter into any alliances or marriages with them, and not even attend any of their feasts, and especially their idolatrous ones: neither make mention of the name of their gods ; not in common conversation, and still less in any religious matters; never with any reverence of them, or in any respectable manner; but always with indignation and contempt, calling them dunghill gods, and the like, as they often are in Scripture: nor cause to swear [by them] ; neither swear by them themselves, nor cause others to swear by them, as Abarbinel; or a man his neighbour, as Kimchi; no, not a Gentile, as Ben Melech; so it is said in the Misnah f520 , “he that vows in the name of an idol, and confirms in his name, (which Bartenora interprets, swears by his name,) transgresses a negative precept.”
Maimonides also says, “he that vows in the name of an idol, and swears by it, is to be beaten--he that swears by it himself, or causes a Gentile to swear by it; for it is forbidden to cause a Gentile to swear by his fear (or idol), and even to cause him to make mention of it, though not in the way of an oath, it is forbidden:” neither serve them ; by offering any sacrifice or incense to them, or by praying to them, or offering them praises on any account, or by performing any religious service in any instance or form whatever: nor bow yourselves unto them ; give them any adoration or worship, external or internal.
Matthew Henry Commentary
Verses 1-10 - Joshua was old and dying, let them observe what he said now. He pu them in mind of the great things God had done for them in his days. He exhorted them to be very courageous. Keep with care, do with diligence and regard with sincerity what is written. Also, very cautiously to endeavour that the heathen idolatry may be forgotten, so that it ma never be revived. It is sad that among Christians the names of the heathen gods are so commonly used, and made so familiar as they are Joshua exhorts them to be very constant. There might be many thing amiss among them, but they had not forsaken the Lord their God; the way to make people better, is to make the best of them.
Original Hebrew לבלתי1115 בוא935 בגוים1471 האלה428 הנשׁארים7604 האלה428 אתכם854 ובשׁם8034 אלהיהם430 לא3808 תזכירו2142 ולא3808 תשׁביעו7650 ולא3808 תעבדום5647 ולא3808 תשׁתחוו׃7812