According to biblical history, the Israelites were in Egypt for 430 years. That's a long, long time. That would be approximately 14 generations. To put it in modern terms (in the year 2012) that would be since the year 1582 CE.
So, during this extremely long time period what happened to the Israelite's religion? Things started out pretty good for the israelites because Joseph, who invited them to come, was an official close to the Pharaoh. But things turned bad quickly when Joseph died; the Israelites found themselves deemed outsiders and then slaves. The bible is completely silent on what, if any, religion the Israelites practiced while in Egypt. But, there are some clues though that may tell us. When Moses confronts Pharaoh and says, 'YHWH wants you to let His people go'; Pharaoh replies, "Who is YHWH...?". It seems Pharaoh has never heard of the Israelite god. Wouldn't this indicate the Israelites had not been worshipping YHWH for quite some time in Egypt? The second clue is when Moses comes down from the mountain after the exodus. He finds the Israelites worshipping a golden calf, that is; practicing Egyptian religion. The third clueis the fact that Moses has to 'school' the Israelites in everything concerning how to worship YHWH during the exodus. What little evidence we have indicates the Israelites had started worshipping Egyptian gods during their 430 years in Egypt and had commpletely forgotten about the Israelite god.
This brings us to Moses. Adopted by Egyptian royalty, Moses was raised in the Egyptian religion. After he left Egypt, Moses went to Midian and married the daughter of a Midianite priest. He lived in Midian for 40 years before the exodus. What religion was Moses practicing those 40 years in Midian? Since his father-in-law was a Midianite priest it seems likely he practiced the Midianite religion. Would he have been permitted to marry the priest's daughter otherwise? The Midiamites had many gods they worshipped and their encounters with their gods took place on mountain tops. Moses meets YHWH on the mountain top near his father-inlaws home (Exod 3:1). Moses's father-in-law (Jethro the Midianite priest) seems to know this god because after the exodus he says, "Blessed be Jehovah, who hath delivered you out of the hand of the Egyptians....Now I know that Jehovah is greater than all gods;"(Exod 18:10-11). Jethro now knows that YHWH isn't just the greatest Midianite god, he's also better than the Egyptian gods. This Midianite priest who seems to have known YHWH longer than Moses then advises Moses on judicial systems (Ex 18:13-24).
So, just before the exodus we have the Israelites worshipping Egyptian gods, and Moses who used to worship Egyptian gods but converted to the Midianite religion and conversed with one priest's god, YHWH. It seems Moses chose to worship only one of the Midianite gods (YHWH) because later the Israelites start worshipping Baal. A war with Midian follows and every Midianite (Moses's home for 40 years) is killed, except for young virgin girls, who could be raised to worship the 'right' Midianite god, YHWH.
The story of YHWH isn't about the Israelite god, it's about a 'civil war' between the Midianite gods YHWH and Baal. The war with Midian was just the start. Uncertain of which god would be victorious, the Israelites continued to vasillate between them. "How long go ye limping between the two sides? if Jehovah be God, follow him; but if Baal, then follow him."(1Kgs 18:21).
thinker