Sayyiduna Ibn Umar (may Allah be pleased with them both) narrates that Umar bin al-Khattab (may Allah be pleased with him) was travelling in a caravan when the Messenger of Allah (peace and blessings be upon him) heard him swearing by his father. So the Messenger of Allah (peace and blessings be upon him) said: "Allah forbids you from swearing by your forefathers. So whoever wishes to swear, let him swear by Allah or else remain silent."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 13122