Several Biblical scholars have suggested that Yahweh originated with a group known as the Shasu, Canaanite nomads from southern Transjordan. An Egyptian inscription at Karnak from the time of Pharaoh Amenhotep III (1390-1352 B.C.E. ) refers to the "Shasu of Yhw," evidence that this god was worshiped among some of the Shasu tribes at this time. [2]
The Exodus story tells us that the Israelites had not been worshipers of Yahweh—at least by that name—before the time of Moses. The revelation of the name to Moses was made at Sinai/Horeb, a mountain sacred to Yahweh,...
http://www.newworldencyclopedia.org/entry/Yahweh
In a "nutshell," it is my understanding that Yahweh is an amalgam, a conflation or fusion of various and sundry earlier gods and goddesses, having absorbed their functions, epithets and achievements. That is to say the Latin Motto found on the coins and currency of the United States of America, E PLURIBUS UNUM, "From Many, One," appropriately describes Yahweh-Elohim.
Gods fused into Yahweh's persona are the Sumerian Enki (Akkadian/Babylonian Ea), Enlil (Ellil), An (Anu), Utu (Shamash), _and_ the Egyptian Hyksos' god Baal Saphon (Baal Hadad) as well as Seth (Seth/Set being assimilated to Baal Saphon) and Sopdu of Egypt, said Egyptian gods surfacing in altered form in the Exodus traditions...
http://www.bibleorigins.net/YahwehYawUgarit.html