The relationship of evolution with diet and environment can provide insights into modern disease. Fossil evidence shows apes, and early human ancestors were fruit eaters living in environments with strongly seasonal climates. Rapid cooling at the end of the Middle Miocene (15-12Ma: millions of years ago) increased seasonality in Africa and Europe, and ape survival may be linked with a mutation in uric acid metabolism. Climate stabilized in the later Miocene and Pliocene (12-5Ma), and fossil apes and early hominins were both adapted for life on ground and in trees. Around 2.5Ma, early species of Homo introduced more animal products into their diet, and this coincided with developing bipedalism, stone tool technology and increase in brain size. Early species of Homo such as Homo habilis still lived in woodland habitats, and the major habitat shift in human evolution occurred at 1.8Ma with the origin of Homo erectus. Homo erectus had increased body size, greater hunting skills, a diet rich in meat, control of fire and understanding about cooking food, and moved from woodland to savannah. Group size may also have increased at the same time, facilitating the transmission of knowledge from one generation to the next. The earliest fossils of Homo sapiens appeared about 300kyr, but they had separated from Neanderthals by 480kyr or earlier. Their diet shifted towards grain-based foods about 100kyr ago, and settled agriculture developed about 10kyr ago. This pattern remains for many populations to this day and provides important insights into current burden of lifestyle diseases.