Biblical Commentary on the Old Testament, by Carl Friedrich Keil and Franz Delitzsh, [1857-78], at sacred-texts.com
The head cup-bearer and head baker had committed crimes against the king of Egypt, and were imprisoned in "the prison of the house of the captain of the trabantes, the prison where Joseph himself was confined;" the state-prison, according to Eastern custom, forming part of the same building as the dwelling-house of the chief of the executioners. From a regard to the exalted position of these two prisoners, Potiphar ordered Joseph to wait upon them, not to keep watch over them; for את פּקד does not mean to appoint as guard, but to place by the side of a person.
After some time ("days," Gen 40:4, as in Gen 4:3), and on the same night, these two prisoners had each a peculiar dream, "each one according to the interpretation of his dream;" i.e., each one had a dream corresponding to the interpretation which specially applied to him. On account of these dreams, which seemed to them to have some bearing upon their fate, and, as the issue proved, were really true omens of it, Joseph found them the next morning looking anxious, and asked them the reason of the trouble which was depicted upon their countenances.
On their replying that they had dreamed, and there was no one to interpret the dream, Joseph reminded them first of all that "interpretations are God's," come from God, are His gift; at the same time he bade them tell him their dreams, from a consciousness, no doubt, that he was endowed with this divine gift.
The cup-bearer gave this account: "In my dream, behold there was a vine before me, and on the vine three branches; and it was as though blossoming, it shot forth its blossom (נצּהּ either from the hapax l. נץ = נצּה, or from נצּה with the fem. termination resolved into the 3 pers. suff.: Ewald, 257d), its clusters ripened into grapes. And Pharaoh's cup was in my hand; and I took the grapes and pressed them into Pharaoh's cup, and gave the cup into Pharaoh's hand." In this dream the office and duty of the royal cup-bearer were represented in an unmistakeable manner, though the particular details must not be so forced as to lead to the conclusion, that the kings of ancient Egypt drank only the fresh juice of the grape, and not fermented wine as well. The cultivation of the vine, and the making and drinking of wine, among the Egyptians, are established beyond question by ancient testimony and the earliest monuments, notwithstanding the statement of Herodotus (2, 77) to the contrary (see Hengstenberg, Egypt and the Books of Moses, pp. 13ff.).
Joseph then gave this interpretation: The three branches were three days, in which time Pharaoh would restore him to his post again ("lift up his head," i.e., raise him from his degradation, send and fetch him from prison, Kg2 25:27). And he added this request (Gen 40:14): "Only think of me, as it goes well with thee, and show favour to me...for I was stolen (i.e., carried away secretly and by force; I did not abscond because of any crime) out of the land of the Hebrews (the land where the Ibrim live); and here also I have done nothing (committed no crime) for which they should put me into the hole." בּור: the cell, applied to a prison as a miserable hole, because often dry cess-pools were used as prisons.
Encouraged by this favourable interpretation, the chief baker also told his dream: "I too,...in my dream: behold, baskets of white bread upon my head, and in the top basket all kinds of food for Pharaoh, pastry; and the birds ate it out of the basket from my head." In this dream, the carrying of the baskets upon the head is thoroughly Egyptian; for, according to Herod. 2, 35, the men in Egypt carry burdens upon the head, the women upon the shoulders. And, according to the monuments, the variety of confectionary was very extensive (cf. Hengst. p. 27). In the opening words, "I too," the baker points to the resemblance between his dream and the cup-bearer's. The resemblance was not confined to the sameness of the numbers-three baskets of white bread, and three branches of the vine-but was also seen in the fact that his official duty at the court was represented in the dream. But instead of Pharaoh taking the bread from his hand, the birds of heaven ate it out of the basket upon his head. And Joseph gave this interpretation: "The three baskets signify three days: within that time Pharaoh will take away thy head from thee ("lift up thy head," as in Gen 40:13, but with מעליך "away from thee," i.e., behead thee), and hang thee on the stake (thy body after execution; vid., Deu 21:22-23), and the birds will eat thy flesh from off thee." However simple and close this interpretation of the two dreams may appear, the exact accordance with the fulfilment was a miracle wrought by God, and showed that as the dreams originated in the instigation of God, the interpretation was His inspiration also.
Joseph's interpretations were fulfilled three days afterwards, on the king's birth-day. הלּדת יום: the day of being born; the inf. Hoph. is construed as a passive with the accus. obj., as in Gen 4:18, etc. Pharaoh gave his servants a feast, and lifted up the heads of both the prisoners, but in very different ways. The cup-bearer was pardoned, and reinstated in his office; the baker, on the other hand, was executed.
But the former forgot Joseph in his prosperity, and did nothing to procure his liberation.