24:14 “Now fear [reverently worship] the LORD and serve [with complete devotion] him with all [not halfhearted loyalty and service] faithfulness [with integrity and truth]. Throw away [essential outward expression of their commitment to the Lord; cf. Josh. 24:23] the gods your forefathers worshiped beyond [area where Abram and his father Terah had lived] the River [the Euphrates River in Mesopotamia] and in Egypt, and serve the LORD.
24:15 But if serving the LORD seems undesirable to you, then choose [no neutrality] for yourselves this day [do not delay] whom you will serve [every body must worship and serve something or someone], whether  the gods [included the moon god and numerous idols] your forefathers served beyond the River [Mesopotamia],  or the gods of the Amorites [people group living in Canaan; sometimes a general designation for all Canaan’s inhabitants], in whose land you are living. But as for me [Joshua set an example by his own choice] and my household, we will serve  the LORD.”
24:16 Then the people answered [easy to say, hard to follow-through], “Far be it from us to forsake the LORD to serve other gods!
24:17 [the people recalled God’s mighty acts on their behalf] It was the LORD our God himself who brought us and our fathers up out of Egypt, from that land of slavery, and performed those great signs before our eyes. He protected us on our entire journey and among all the nations through which we traveled.
24:18 And the LORD drove out before us all the nations, including the Amorites, who lived in the land. We too will serve the LORD, because he is our God.”
24:19 Joshua said [words not meant to discourage but rather to cause the people to realize the cost of serving the Lord (cf. Lk. 14:25-35); “a kind of holy provoking” (Bisagno)] to the people, “You are not able to serve the LORD. He is a holy [separate or set apart] God; he is a jealous [God demands and deserves our undivided loyalty and love] God. He will not forgive your rebellion [conveys deliberate revolt against God] and your sins.
24:20 If you forsake the LORD and serve foreign gods, he will turn and bring disaster [cf. Deut. 28:15-68] on you and make an end of you, after he has been good to you.”
24:21 But the people said to Joshua, “No! We will serve the LORD.”
24:22 Then Joshua said, “You are witnesses against yourselves [in other words, their own words would condemn them if they failed to follow-through on their commitment] that you have chosen to serve the LORD.” “Yes, we are witnesses,” they replied.
24:23 “Now then,” said Joshua, “throw away [essential outward expression of their commitment to the Lord; cf. Josh. 24:14] the foreign gods that are among you and yield your hearts [inward loyalty] to the LORD, the God of Israel.”
24:24 And the people said to Joshua, “We will serve the LORD our God and obey him.”
24:25 On that day Joshua made a covenant [a renewal of the covenant God had made with them through Moses (cf. Ex. 19:1-6)] for the people, and there at Shechem he drew up for them decrees and laws [basic stipulation was that they follow God in complete loyalty and obedience].
24:26 And Joshua recorded [so that they wouldn’t forget] these things in the Book of the Law of God. Then he took a large stone and set it up [to serve as a perpetual witness to their agreement; a tangible outward expression of their inner commitment] there under the oak near the holy place of the LORD.
24:27 “See!” he said to all the people. “This stone will be a witness against us. It has heard all the words the LORD has said to us. It will be a witness against you if you are untrue to your God.”
Note: Why is accountability essential to the process of keeping a commitment?