“How we live either condemns or vindicates our commitment to God.”
(22) And Joshua said unto the people, Ye are witnesses against yourselves that ye have chosen you the LORD, to serve him. And they said, We are witnesses.
(23) Now therefore put away, said he, the strange gods which are among you, and incline your heart unto the LORD God of Israel.
(24) And the people said unto Joshua, The LORD our God will we serve, and his voice will we obey.
The first generation out of Egypt had died in the wilderness. They had repeatedly fallen to the sin of idolatry. However, the new generation (this generation in Joshua) had not followed in the footsteps of their parents.
“The new generation, which had been received afresh into covenant with the Lord… had no idols of wood, stone, or metal, but only the “figments of false gods,” as Calvin calls them, the idols of the heart, which it was to put away, that it might give its heart entirely to the Lord, who is not content with divided affections, but requires the whole heart (Deuteronomy 6:5-6).”Keil & Delitszch, Joshua 24:22-23, e-sword ver. 11.1.0
We must be mindful of what we know about ourselves, what God knows about us, and what others see as we live committed to God. Our actions should match our claims.