Scholars are in bitter disagreement over the origin of the the Yahweh religion and the identity of its founder, Moses. While Moses is an Egyptian name, the religion itself comes from Midian. In the account, Moses lives for a time with a Midianite priest, Jethro, at the foot of Mount Sinai. The Midianites seem to have a Yahweh religion already in place; they worship the god of Mount Sinai as a kind of powerful nature deity. So it's possible that the Hebrews picked up the Yahweh religion from another group of Semites and that this Yahweh religion slowly developed into the central religion of the Hebrews. All scholars are agreed, however, that the process was slow and painful. In the Hebrew history, all during the migration and for two centuries afterwards, the Hebrews follow many various religions unevenly.
The Mosaic religion was initially a monolatrous religion; while the Hebrews are enjoined to worship no deity but Yahweh, there is no evidence that the earliest Mosaic religion denied the existence of other gods. In fact, the account of the migration contains numerous references by the historical characters to other gods, and the first law of the Decalogue is, after all, that no gods be put before Yahweh, not that no other gods exist. While controversial among many people, most scholars have concluded that the initial Mosaic religion for about two hundred years was a monolatrous religion. For there is ample evidence in the Hebrew account of the settlement of Palestine, that the Hebrews frequently changed religions, often several times in a single lifetime.