Abu Tarīf ‘Adiyy ibn Hātim (may Allah be pleased with him) reported that the Prophet (may Allah’s peace and blessings be upon him) said: "Whoever takes an oath to do something and then he finds a better alternative which brings him closer…
Original Arabic
عن أبي طَرِيف عدي بن حاتم رضي الله عنه مرفوعاً: «مَن حَلَف على يَمِين ثم رأى أَتقَى لله مِنها فَلْيَأت التَّقوَى».
Read Hadith