The Prophet ﷺ said, "Learn enough of your lineage to maintain your family ties, for keeping the bonds of kinship brings love within the family, abundance in wealth, and a longer life."
عن النبي ﷺ قال: تعلموا من أنسابكم ما تصلون به أرحامكم، فإن صلة الرحم محبة في الأهل، مثراة في المال، منسأة في الأثر.
Tirmidhi (1979), Ahmad (8868), and Hakim (4/161) all narrated it through the route of Abdullah bin Mubarak, from Abdul-Malik bin Isa Thaqafi, from Yazid, the freedman of Munbaith, from Abu Hurairah, who said, and then he mentioned it. Its chain of transmission is hasan because of Abdul-Malik bin Isa Thaqafi and his teacher Yazid, the freedman of Munbaith, for both of them are hasan al-hadith.