Circumcision at Gilgal
Upon their arrival at the camp in Gilgal, God instructs Joshua to prepare the Israelites to observe the first Passover that a sizeable percentage of them have ever been allowed to participate in. Apparently, as part of Israel's rejection, the people in the wilderness did not circumcise their sons (verses 2-7). And keeping the Passover in the wilderness would have required the exclusion of these uncircumcised sons (Exodus 12:43-49 Exodus 12:43-49  And the LORD said to Moses and Aaron, This is the ordinance of the passover: There shall no stranger eat thereof:
 But every man's servant that is bought for money, when you have circumcised him, then shall he eat thereof.
 A foreigner and an hired servant shall not eat thereof.
 In one house shall it be eaten; you shall not carry forth ought of the flesh abroad out of the house; neither shall you break a bone thereof.
 All the congregation of Israel shall keep it.
 And when a stranger shall sojourn with you, and will keep the passover to the LORD, let all his males be circumcised, and then let him come near and keep it; and he shall be as one that is born in the land: for no uncircumcised person shall eat thereof.
 One law shall be to him that is home born, and to the stranger that sojournes among you.
American King James Version×). Still, it seems likely that the Passover would have been kept by the nation of Israel all through the wilderness wanderings—by all those who came out of Egypt and then, after the older generation died out, by Joshua, Caleb, all the males of the first generation who were under 20 at the time of the Exodus and, presumably, the women. (It should be noted that even the uncircumcised males would have observed God's festivals in general—along with the rest of Israel.)
Now, on the 10th day of the month on which Israel came up from the Jordan (Joshua 4:19 Joshua 4:19And the people came up out of Jordan on the tenth day of the first month, and encamped in Gilgal, in the east border of Jericho.
American King James Version×), the day the Passover lambs were chosen in Egypt (Exodus 12:3 Exodus 12:3Speak you to all the congregation of Israel, saying, In the tenth day of this month they shall take to them every man a lamb, according to the house of their fathers, a lamb for an house:
American King James Version×), God confirms that He has chosen the Israelites as His people. The Bible elsewhere explains that physical circumcision is a type of spiritual circumcision "of the heart" (Deuteronomy 30:6 Deuteronomy 30:6And the LORD your God will circumcise your heart, and the heart of your seed, to love the LORD your God with all your heart, and with all your soul, that you may live.
American King James Version×; Romans 2:29 Romans 2:29But he is a Jew, which is one inwardly; and circumcision is that of the heart, in the spirit, and not in the letter; whose praise is not of men, but of God.
American King James Version×), which entails repentance from past sin and obedience to God. In literal circumcision, there is a rending of a veil of flesh and a shedding of blood that is reminiscent of sacrifices. Egypt is a type in Scripture of the sinful life we have left behind.
All of this is most interesting when we consider the words of Joshua 5:9 Joshua 5:9And the LORD said to Joshua, This day have I rolled away the reproach of Egypt from off you. Why the name of the place is called Gilgal to this day.
American King James Version×: "Then the Lord said to Joshua, 'This day I have rolled away the reproach of Egypt from you.' Therefore the name of the place is called Gilgal to this day." As The King James Study Bible notes: "A play on words occurs here. Gilgal ('Rolling Away') marks the place where God rolled away the reproach of Egypt. Israel's era of shameful captivity [and rejection] now came officially to an end. The inheritance of Canaan lay ahead (compare Joshua 1:6 Joshua 1:6Be strong and of a good courage: for to this people shall you divide for an inheritance the land, which I swore to their fathers to give them.
American King James Version×; Joshua 21:43-45 Joshua 21:43-45  And the LORD gave to Israel all the land which he swore to give to their fathers; and they possessed it, and dwelled therein.  And the LORD gave them rest round about, according to all that he swore to their fathers: and there stood not a man of all their enemies before them; the LORD delivered all their enemies into their hand.  There failed not ought of any good thing which the LORD had spoken to the house of Israel; all came to pass.
American King James Version×). The same verbal root marks the New Testament site of Golgotha, the place where mankind's captivity by sin [and resultant rejection] was ended [that is, for those who have repented and obtained forgiveness]. There man's sins were rolled away and rolled onto the person of Jesus Christ, so believers might enter God's spiritual inheritance" (note on Joshua 5:9 Joshua 5:9And the LORD said to Joshua, This day have I rolled away the reproach of Egypt from off you. Why the name of the place is called Gilgal to this day.
American King James Version×). And this, of course, requires our spiritual circumcision. Indeed, it is only through being spiritually circumcised that we are allowed to partake of the bread and wine of the New Testament Passover.
The Israelites take a few days to heal (compare Joshua 5:8 Joshua 5:8And it came to pass, when they had done circumcising all the people, that they stayed in their places in the camp, till they were whole.
American King James Version×), and undoubtedly many of them are still sore when they keep the Passover a few days later, on the 14th of Abib (verse 10), and when they start their processions around Jericho, which apparently begin the next day.
This next day, Abib 15, was the First Day of Unleavened Bread. It was on this Holy Day that Joshua encountered the "Commander of the army of the Lord" (verse 14), who proved to be none other than God Himself, since Joshua was permitted to worship Him (compare Revelation 19:10 Revelation 19:10And I fell at his feet to worship him. And he said to me, See you do it not: I am your fellow servant, and of your brothers that have the testimony of Jesus: worship God: for the testimony of Jesus is the spirit of prophecy.
American King James Version×; Revelation 22:8-9 Revelation 22:8-9  And I John saw these things, and heard them. And when I had heard and seen, I fell down to worship before the feet of the angel which showed me these things.  Then said he to me, See you do it not: for I am your fellow servant, and of your brothers the prophets, and of them which keep the sayings of this book: worship God.
American King James Version×) and since Joshua was commanded to remove his sandals in this Being's presence, just as Moses was commanded to do before God at the burning bush (verse 15; compare Exodus 3:5-6 Exodus 3:5-6  And he said, Draw not near here: put off your shoes from off your feet, for the place where on you stand is holy ground.  Moreover he said, I am the God of your father, the God of Abraham, the God of Isaac, and the God of Jacob. And Moses hid his face; for he was afraid to look on God.
American King James Version×). In both cases, it should be noted, this was the preincarnate Jesus Christ and not God the Father (compare John 1:18 John 1:18No man has seen God at any time, the only begotten Son, which is in the bosom of the Father, he has declared him.
American King James Version×; John 6:46 John 6:46Not that any man has seen the Father, save he which is of God, he has seen the Father.
American King James Version×; 1 Corinthians 10:4 1 Corinthians 10:4And did all drink the same spiritual drink: for they drank of that spiritual Rock that followed them: and that Rock was Christ.
American King James Version×; see our free booklet Who Is God?).
God—that is, the preincarnate Christ—made His appearance to Joshua on this occasion to provide encouragement for the task ahead, of taking the land. Christ's instructions to Joshua immediately follow in the next verses (Joshua 6:2-5 Joshua 6:2-5  And the LORD said to Joshua, See, I have given into your hand Jericho, and the king thereof, and the mighty men of valor.
 And you shall compass the city, all you men of war, and go round about the city once. Thus shall you do six days.
 And seven priests shall bear before the ark seven trumpets of rams' horns: and the seventh day you shall compass the city seven times, and the priests shall blow with the trumpets.
 And it shall come to pass, that when they make a long blast with the ram's horn, and when you hear the sound of the trumpet, all the people shall shout with a great shout; and the wall of the city shall fall down flat, and the people shall ascend up every man straight before him.
American King James Version×).