It was narrated from 'Abdur-Rahman bin Samurah that :
the Messenger of Allah (ﷺ) said: 'Do not take oaths by idols nor by your forefathers. " (ID)
English reference (ID): Vol. 3, Book 11, Hadith 2095 (ID)
Arabic reference (ID): Book 11, Hadith 2173 (ID)