evolution of giraffes

the evolution of giraffes has 2 theory one of the was. they are trying to eat the leafs of the tree in doing so there neck started to grow longer and longer. the seconed theory was to mate.