linguistic:translation, structural:summarization, information:extraction
Evolution

The giraffe is one of only two living genera of the family Giraffidae in the order Artiodactyla, the other being the okapi. They are ruminants of the clade Pecora, along with Antilocapridae (pronghorns), Cervidae (deer), Bovidae (cattle, antelope, goats and sheep) and Moschidae (musk deer). A 2019 genome study (cladogram below) finds that Giraffidae are a sister taxon to Antilocapridae, with an estimated split of over 20 million years ago.

The family Giraffidae was once much more extensive, with over 10 fossil genera described. The elongation of the neck appears to have started early in the giraffe lineage. Comparisons between giraffes and their ancient relatives suggest vertebrae close to the skull lengthened earlier, followed by lengthening of vertebrae further down. One early giraffid ancestor was Canthumeryx, which has been dated variously to have lived 25 to 20 million years ago, 17–15 mya or 18–14.3 mya and whose deposits have been found in Libya. This animal resembled an antelope and had a medium-sized, lightly built body. Giraffokeryx appeared 15–12 mya on the Indian subcontinent and resembled an okapi or a small giraffe, and had a longer neck and similar ossicones. Giraffokeryx may have shared a clade with more massively built giraffids like Sivatherium and Bramatherium.

Giraffids like Palaeotragus, Shansitherium and Samotherium appeared 14 mya and lived throughout Africa and Eurasia. These animals had broader skulls with reduced frontal cavities. Paleotragus resembled the okapi and may have been its ancestor. Others find that the okapi lineage diverged earlier, before Giraffokeryx. Samotherium was a particularly important transitional fossil in the giraffe lineage, as the length and structure of its cervical vertebrae were between those of a modern giraffe and an okapi, and its neck posture was likely similar to the former's. Bohlinia, which first appeared in southeastern Europe and lived 9–7 mya, was likely a direct ancestor of the giraffe. Bohlinia closely resembled modern giraffes, having a long neck and legs and similar ossicones and dentition.

Bohlinia colonised China and northern India and produced the Giraffa, which, around 7 million years ago, reached Africa. Climate changes led to the extinction of the Asian giraffes, while the African giraffes survived and radiated into new species. Living giraffes appear to have arisen around 1 million years ago in eastern Africa during the Pleistocene. Some biologists suggest the modern giraffes descended from G. jumae; others find G. gracilis a more likely candidate. G. jumae was larger and more robust, while G. gracilis was smaller and more slender.

The changes from extensive forests to more open habitats, which began 8 mya, are believed to be the main driver for the evolution of giraffes. During this time, tropical plants disappeared and were replaced by arid C4 plants, and a dry savannah emerged across eastern and northern Africa and western India. Some researchers have hypothesised that this new habitat, coupled with a different diet, including acacia species, may have exposed giraffe ancestors to toxins that caused higher mutation rates and a higher rate of evolution. The coat patterns of modern giraffes may also have coincided with these habitat changes. Asian giraffes are hypothesised to have had more okapi-like colourations.

The giraffe genome is around 2.9 billion base pairs in length, compared to the 3.3 billion base pairs of the okapi. Of the proteins in giraffe and okapi genes, 19.4% are identical. The divergence of giraffe and okapi lineages dates to around 11.5 mya. A small group of regulatory genes in the giraffe appears responsible for the animal's height and associated circulatory adaptations.