The Messenger of Allah ﷺ caught up with Umar while he was in a caravan swearing by his father. He said, "Do not swear by your fathers. Whoever swears, let him swear by Allah or remain silent."
حدثنا يحيى بن سعيد عن عبيد الله أخبرني نافع
أن رسول الله ﷺ أدرك عمر وهو في ركب وهو يحلف بأبيه فقال لا تحلفوا بآبائكم ليحلف حالف بالله أو ليسكت