The Prophet (ﷺ) said, "Do not swear by your fathers; and whoever wants to swear should swear by Allah."
Sahih al-Bukhari Book 97, Hadith 30