At the beginning, there were five different religious groups of people in Egypt. Each groups had different beliefs, and were based in different places.
During the history of Egypt, the beliefs changed with the leader. When someone rose in power, their belief system rose as well. The new beliefs would combined with the beliefs that were already there. This happened even after the end of the ancient Egyptian civilization as it is known today. An example of this might be the New Kingdom. During its time, the gods Ra and Amun, became Amun-Ra. Joining to create one god is usually referred to as