ENOfficial
Abu Musa reported God’s Messenger as saying, “I swear by God that if God will, I shall not swear an oath and then consider something else to be better than it without making atonement for my oath and doing the thing that is better.” (Bukhari and Muslim.)
Source: sunnah.com
Other translations
Arabic
وَعَنْ أَبِي مُوسَى قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «أَنِّي وَاللَّهِ إِنْ شَاءَ اللَّهُ لَا أَحْلِفُ عَلَى يَمِينٍ فَأَرَى غَيْرَهَا خَيْرًا مِنْهَا إِلَّا كَفَّرْتُ عَنْ يَمِينِي وَأَتَيْتُ الَّذِي هُوَ خَيْرٌ»
sunnah.com