Genesis 17:9

And God said unto Abraham, Thou shalt keep my covenant therefore, thou, and thy seed after thee in their generations.

The charge to keep the covenant came when Abraham had been nearly twenty-five years in Canaan, together with the revelation of God as Almighty God and the call to walk before Him and be perfect, the changing of Abram to Abraham meaning father of a great multitude and of Sarai to Sarah meaning princess, and the promise that Sarah would be a mother of nations with kings of people coming from her. Abraham and his seed and descendants after him in their generations were on their part to keep God's covenant and were responsible for keeping it through their generations. That keeping was pledged by the rite of circumcision, which is the covenant's token, sign and pledge.

Circumcision was a seal of the righteousness of the faith which Abraham had while still uncircumcised, and a token that they were devoted to the service of God and thus separated from idolaters, and that God accepted them as His peculiar treasure. To keep the covenant therefore means to remain separate from other nations and idolaters and faithful and devoted to God, especially by not contracting marriages with the heathen. Such marriages with the heathen cause loss of reverence for God and His holy law and lead to engaging in the sinful practices of other nations and being seduced into idolatry. Remaining separate was meant to guard them from intermarriage, idolatry and rebellion, and their failure to preserve this distinct character led to hardship, though God remained mindful of His covenant with Abraham.

The covenant is tied to obedience to God's law. Had they kept the covenant, they would not have fallen into idolatry or gone down to Egypt. Had they kept it, God would not have needed to proclaim the Ten Commandments and the law at Sinai or to give Moses further judgments and statutes and directions to guard it.