Think of it like a fingerprint. There is no one gene, but by assessing a collection of them against prior examples of people who are native to a region you can trace it back.
And by collection I don't mean like 5, I mean thousands.
You could find out the family bloodline and the village if you had a reference to go against. Hence how we know who was descended from Gengas Kahn and other ancient historical people.