Allah's Messenger (ﷺ) said, "Do not swear by your fathers."

Sahih al-Bukhari Book 83, Hadith 27