Using 17 chemical elements as a proxy for stellar DNA, we present a full phylogenetic study of stars in the solar neighbourhood. This entails applying a clustering technique that is widely used in molecular biology to construct an evolutionary tree from which three branches emerge. These are interpreted as stellar populations that separate in age and kinematics and can be thus attributed to the thin disc, the thick disc and an intermediate population of probable distinct origin. We further find six lone stars of intermediate age that could not be assigned to any population with enough statistical significance. Combining the ages of the stars with their position on the tree, we are able to quantify the mean rate of chemical enrichment of each of the populations, and thus show in a purely empirical way that the star formation rate in the thick disc is much higher than that in the thin disc. We are also able to estimate the relative contribution of dynamical processes such as radial migration and disc heating to the distribution of chemical elements in the solar neighbourhood. Our method offers an alternative approach to chemical tagging methods with the advantage of visualizing the behaviour of chemical elements in evolutionary trees. This offers a new way to search for ' common ancestors' that can reveal the origin of solar neighbourhood stars.