Just swear by Allah

Narrated Ibn ‘Umar (RA): Allah’s Messenger (ﷺ) overtook ‘Umar bin al-Khattab when he was with a party of riders of about ten and ‘Umar was swearing by his father. Allah’s Messenger (ﷺ) called them and said, “Verily! Allah forbids you from swearing by your fathers. Therefore, if anyone swears, he must swear by Allah or keep silent.”
Bukhari: 6646