ENOfficial
He reported God’s Messenger as saying, “God forbids you to swear by your fathers. If anyone swears he must swear by God, or keep silent.” (Bukhari and Muslim.)
Source: sunnah.com
Other translations
Arabic
وَعَنْهُ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: «إِنَّ اللَّهَ يَنْهَاكُمْ أَنْ تَحْلِفُوا بِآبَائِكُمْ مَنْ كَانَ حَالِفًا فَلْيَحْلِفْ بِاللَّهِ أَوْ ليصمت»
sunnah.com