The Messenger of Allah ﷺ heard me swearing an oath by my father and said: “Allah forbids you to swear by your fathers.” ‘Umar said: By Allah, I never swore by my father after that, whether saying it myself or narrating what someone else had said. (Using translation from Aḥmad 241)
أَنَّ رَسُولَ اللهِ ﷺ سَمِعَ عُمَرَ ؓ وَهُوَ يَقُولُ وَأَبِي وَأَبِي فَقَالَ إِنَّ اللهَ يَنْهَاكُمْ أَنْ تَحْلِفُوا بِآبَائِكُمْ قَالَ عُمَرُ فَوَاللهِ مَا حَلَفْتُ بِهِ ذَاكِرًا وَلَا آثِرًا