Lamarck, and the inheritance of acquired characteristics, makes a comeback!
Adapt first, mutate later: Is evolution out of order? - life - 14 January 2015 - New Scientist
Lamarckian evolution is often illustrated by giraffes' necks. Suppose giraffes, who start their evolutionary history with normal-sized necks, start stretching to reach the leaves high up in trees. In response to this their necks get longer (due to plasticity in growth). Because they've acquired longer necks during their lifetime, their offspring are born with longer necks. They inherit the acquired characteristic of their parents. This is generally now dismissed as heretical because there is no mechanism to pass acquired characteristics to their genetic material*. Evolution progresses instead by random mutations of genes and those which, by chance, confer competitive advantage are kept through natural selection.
The giraffes elongate their necks by stretching as described above. Now that they have longer necks they can move to live somewhere which only has leaves higher up in the trees. But this means that their offspring have to stretch to get food, and so all the giraffes in the population will have longer necks, and this will continue through the generations. But more, and crucially, giraffes born into this population who have, by random mutations, a genetic code for a longer neck, will be even more advantaged. And conversely, giraffes for which genetic mutations have given them short necks won't be able to eat and will die. So over time the long necks get encoded in the genes, and in this way we have a mechanism for getting the acquired characteristic into the genes.
An issue here is about the location of the information telling giraffes to grow long necks. Perhaps the point is that it is not just in the genes, but also in the environment.
*Though there have been other reports supporting variations on Lamarckian evolution. See, for example, A Comeback for Lamarckian Evolution?