Arcana Coelestia #9344
9344. 'You shall not make a covenant with them and their gods' means no contact with evils and falsities. This is clear from the meaning of 'making a covenant' as being joined together, dealt with in 665, 666, 1023, 1038, 1864, 1996, 2003, 2021, 6804, 8767, 8778, thus also being in contact with, for people who communicate with one another are joined to one another; from the meaning of the inhabitants of the land, to whom 'those with whom they were not to make a covenant' refers here, as evils, dealt with just above in 9342; and from the meaning of 'their gods' as falsities, dealt with in 4402 (end), 4544, 7873, 8867, 8941.
Arcana Coelestia #665
665. That establishing a covenant' means that he would be regenerated becomes quite clear from the fact that the only kind of covenant that can exist between the Lord and man is conjunction by virtue of love and faith. And so a covenant means conjunction; indeed it is the heavenly marriage that is the supreme covenant of all. The heavenly marriage or conjunction does not show itself however except with people who are being regenerated. Regeneration itself therefore in the broadest sense is meant by a covenant. The Lord enters into a covenant with man when He regenerates him, and consequently among men of old a covenant had no other representation. From the sense of the letter no other impression is gained than that the covenant made with Abraham, Isaac, and Jacob, and so often with their descendants, concerned just those personages. But those people were by nature such as to be incapable of being regenerated, for they focused worship exclusively on things that were external, and imagined external things to be sacred without things that are internal allied to them. Consequently the covenants made with them were no more than representations of regeneration, as were all their religious ceremonies, and as were Abraham, Isaac, and Jacob themselves who represented the things of love and faith. In a similar way priests or high priests, whatever their character, including infamous ones, could represent the heavenly and most holy priesthood. In representations no attention is paid to the person who represents but to that which is represented by him. Thus all the kings of Israel and Judah, including the worst of them, represented the Lord's kingship, and so indeed did the Pharaoh who promoted Joseph over the land of Egypt. These and many other considerations which in the Lord's Divine mercy will be dealt with later on show that the covenants made so often with the sons of Jacob were nothing more than religious ceremonies which were representative.