"And Moses took the bones of Joseph," etc. This teaches that all Israel stretched out their hands to the spoil that they brought up from Egypt, but Moses busied himself only with a commandment. For when Joseph died and the Egyptians heard that he had made his brothers swear that they would not go up from Egypt until they took his bones up with them, they placed Joseph in a coffin of lead and cast it into the river Nile, and they said: From now on they will not be able to bring him up. And Moses wrote the Explicit Name and cast it into the Nile, and Joseph's coffin floated up upon the surface of the waters, and Moses stood and took it. "For he had surely sworn" — and why two oaths? Rather, he made his brothers swear that they would make their children swear. "From here with you" — this teaches that each and every tribe brought up its prince with it.
Moses Raises Joseph's Coffin From the Nile by the Explicit Name
Midrash Aggadah, Exodus 13:19
ויקח משה את עצמות יוסף וגו'. מלמד שכל ישראל פשטו ידיהם בביזה שהעלו ממצרים, ומשה לא נתעסק אלא במצוה, כי כשמת יוסף ושמעו מצרים שהשביע את אחיו שלא יעלו ממצרים עד שיקחו את עצמותיו עמהם, שמו ליוסף בארון של אבר, והפילוהו לנהר נילוס, ואמרו מעתה לא יוכלו להעלותו, וכתב משה שם המפורש והשליכו לנילוס, וארונו של יוסף צפה על פני המים. ומשה עמד ולקחו: כי השבע השביע. ולמה שתי שבועות, אלא השביע לאחיו שישבעו לגניהם: מזה אתכם. מלמד שכל שבט ושבט העלה נשיאו עמו: