The Prophet ﷺ heard Umar saying, "By my father, by my father." He said, "Indeed, Allah forbids you from swearing by your fathers."Umar said, "By Allah, I never swore by him after that, neither speaking on my own nor quoting another."
حدثنا قتيبة حدثنا سفيان عن الزهري
سمع النبي ﷺ عمر وهو يقول وأبي وأبي فقال ألا إن الله ينهاكم أن تحلفوا بآبائكم فقال عمر فوالله ما حلفت به بعد ذلك ذاكرا ولا آثرا
Agreed upon. Muslim narrated it in the Book of Oaths, chapter on the prohibition of swearing by anything other than Allah Almighty, hadith no. 1646, from the hadith of Sufyan bin Uyayna, and Bukhari, hadith no. 6647, from the hadith of Zuhri through the same route.On this topic there are also narrations from Thabit bin Dahhak [coming up, no. 1543], Ibn Abbas [Abu Dawud, no. 3322], Abu Hurairah [coming up, no. 1545], Qutayla [Nasai, 6/7, no. 3804, and Ahmad, 6/371], and Abdul-Rahman bin Samura [mentioned previously, no. 1529].