Krishna and Satyabhama ( Sathyabhama ) shared a common paternal ancestor, Anamitra.
The rule according to rig Veda is that one cannot share a common paternal ancestor for 7 generations and maternal ancestor for 5 generations.
I had encountered this in a book on Rig Veda, but I am not able to recollect it.
Also Manusmriti 3.5 says:
"Marriage should he performed with persons not belonging to the same Pravara;—above the Seventh grade among his paternal relations;—also beyond persons of the same seed;—and above the fifth grade among maternal relations."
Animitra was at least 11 generations ago for Krishna (https://en.wikipedia.org/wiki/Vrishni)
Gotras I believe are an easy way to enforce this rule.