The animals we call cows and goats split around 26 million years ago. The animals that would go on to become goats and sheep split around 15 million years ago. The Ibex and the animals we know as goats split around 8 million years ago.
Goats are one of the oldest domesticated animals and are thought to have been a regular part of the human story starting around 10,000 years ago. Genetic studies of modern goat species have identified six distinct maternal lines of goats, referred to as Haplogroups A, B, C, D, E, F, and G. Haplogroup A has the widest distribution, existing in Europe, Africa, and the Americas; B exists mainly in East Asia, and some researchers speculate this may indicate an independent domestication in China. The other haplogroups are found in parts of Europe, Mongolia, and spread out in Sicily, South & Central and West Asia, and scattered across the various Pacific island regions.
 Domestication Process of the Goat Revealed by an Analysis of the Nearly Complete Mitochondrial Protein-Encoding Genes from NIH.gov by Nomura, et al., https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3731342/#s1title 6 Oct 2020
 Wikipedia on Goats https://en.m.wikipedia.org/wiki/Goat 6 Oct 2020