And all the congregation of the children of Israel journeyed from the wilderness of Sin, after their journeys, according to the commandment of the LORD, and pitched in Rephidim: and there was no water for the people to drink.
They journeyed according to the commandment of the Lord, led by the pillar of cloud and fire, and yet they came to a place where there was no water for them to drink - We may be in the way of our duty, and yet meet with troubles, which Providence brings us into for the trial of our faith.
 And the LORD said unto Moses, Go on before the people, and take with thee of the elders of Israel; and thy rod, wherewith thou smotest the river, take in thine hand, and go.
Go on before the people — Though they spake of stoning him. He must take his rod with him, not to summon some plague to chastise them, but to fetch water for their supply. O the wonderful patience and forbearance of God towards provoking sinners! He maintains those that are at war with him, and reaches out the hand of his bounty to those that lift up the heel against him. If God had only shewed Moses a fountain of water in the wilderness, as he did to Hagar, not far from hence, Genesis 21:19, that had been a great favour; but that he might shew his power as well as his pity, and make it a miracle of mercy, he gave them water out of a rock. He directed Moses whither to go, appointed him to take of the elders of Israel with him, to be witnesses of what was done, ordered him to smite the rock, which he did, and immediately water came out of it in great abundance, which ran throughout the camp in streams and rivers, Psalms 78:15,16, and followed them wherever they went in that wilderness: God shewed his care of his people in giving them water when they wanted it; his own power in fetching it out of a rock, and put an honour upon Moses in appointing the water to flow out upon his smiting of the rock. This fair water that came out of the rock is called honey and oil, Deuteronomy 32:13, because the people's thirst made it doubly pleasant; coming when they were in extreme want. It is probable that the people digged canals for the conveyance of it, and pools for the reception of it. Let this direct us to live in a dependance, 1. Upon God's providence even in the greatest straits and difficulties; 2. And upon Christ's grace; that rock was Christ, 1 Corinthians 10:4. The graces and comforts of the Spirit are compared to rivers of living waters, John 7:38,39; 4:14. These flow from Christ. And nothing will supply the needs and satisfy the desires of a soul but water out of this rock. A new name was upon this occasion given to the place, preserving the remembrance of their murmuring, Massah - Temptation, because they tempted God, Meribah - Strife, because they chide with Moses.
 Then came Amalek, and fought with Israel in Rephidim.
Then Amalek came and fought with Israel — The Amalekites were the posterity of Esau, who hated Jacob because of the birth-right and blessing. They did not boldly front them as a generous enemy, but without any provocation given, basely fell upon their rear, and smote them that were faint and feeble.
 And Moses said unto Joshua, Choose us out men, and go out, fight with Amalek: to morrow I will stand on the top of the hill with the rod of God in mine hand.
I will stand on the top of the hill with the rod of God in my land — See how God qualifies his people for, and calls them to various services for the good of his church; Joshua fights, Moses prays, and both minister to Israel. This rod Moses held up, not so much to Israel as to animate them; as to God by way of appeal to him; Is not the battle the Lord's? Is not he able to help, and engaged to help? Witness this rod! Moses was not only a standard-bearer, but an intercessor, pleading with God for success and victory.
 So Joshua did as Moses had said to him, and fought with Amalek: and Moses, Aaron, and Hur went up to the top of the hill.
Hur is supposed to have been the husband of Miriam.
 And it came to pass, when Moses held up his hand, that Israel prevailed: and when he let down his hand, Amalek prevailed.
And when Moses held vp his hand in prayer (so the Chaldee explains it) Israel prevailed, but when he let down his hand from prayer, Amalek prevailed - To convince Israel that the hand of Moses (with whom they had just now been chiding) contributed more to their safety than their own hands; the success rises and falls, as Moses lifts up or lets down his hand. The church's cause is ordinarily more or less successful, according as the church's friends are more or less fervent in prayer.
 And Joshua discomfited Amalek and his people with the edge of the sword.
Though God gave the victory, yet it is said Joshua discomfited Amalek, because Joshua was a type of Christ, and of the same name, and in him it is that we are more than conquerors.
 And Moses built an altar, and called the name of it Jehovahnissi:
And Moses built an altar, and called it Jehovah-niffi — The Lord is my banner. The presence and power of Jehovah was the banner under which they were lifted, by which they were animated, and kept together, and therefore which they erected in the day of their triumph. In the name of our God we must always lift up our banners: He that doth all the work should have all the praise.
Write this for a memorial — This is the first mention of writing we find in scripture; and perhaps the command was not given till after the writing of the law on tables of stone.