Since chemical abundances are inherited between generations of stars, we use them to trace the evolutionary history of our Galaxy. We present a robust methodology for creating a phylogenetic tree, a biological tool used for centuries to study heritability. Combining our phylogeny with information on stellar ages and dynamical properties, we reconstruct the shared history of 78 stars in the solar neighbourhood. The branching pattern in our tree supports a scenario in which the thick disc is an ancestral population of the thin disc. The transition from thick to thin disc shows an anomaly, which we attribute to a star formation burst. Our tree shows a further signature of the variability in stars similar to the Sun, perhaps linked to a minor star formation enhancement creating our Solar system. In this paper, we demonstrate the immense potential of a phylogenetic perspective and interdisciplinary collaboration, where with borrowed techniques from biology we can study key processes that have contributed to the evolution of the Milky Way.