Joshua 22:5
But take diligent heed to do the commandment and the law, which Moses the servant of the LORD charged you, to love the LORD your God, and to walk in all his ways, and to keep his commandments, and to cleave unto him, and to serve him with all your heart and with all your soul.
The verse was Joshua's farewell charge to the fighting men of Gad and Reuben and the half-tribe of Manasseh, who had chosen their inheritance east of the Jordan, as they left Canaan to return to their homes and families in that inheritance. Before they departed they were commended for courage and loyalty in fully keeping their pledge to Moses by sharing in all the conflicts of their fellow Israelites. The charge was given with earnestness and an anxious heart because the tribes would now live at a distance from the sanctuary in an isolated and wandering life on the borders of heathen tribes, with strong temptation to fall into heathen customs.
Living far from the tabernacle also brought the danger of losing interest in its services and thereby departing from God. Therefore the verse urges diligent and urgent heed to do the commandment and the law charged by Moses the servant of the Lord, by loving the Lord God, walking in all His ways, and keeping His commandments. That obedience includes cleaving unto Him and serving Him with all the heart and with all the soul.