The Messenger of Allah ﷺ said, "The one who takes back his gift is like the one who returns to his vomit."
حدثنا محمد بن بشار ومحمد بن المثنى قالا حدثنا محمد بن جعفر حدثنا شعبة قال سمعت قتادة يحدث عن سعيد بن المسيب
قال رسول الله ﷺ العائد في هبته كالعائد في قيئه
Bukhari included it in the Book of Gifts and Their Merit and Encouragement Toward Them, chapter, "It is not permissible for anyone to take back their gift or charitable donation," hadith 2621, from the hadith of Shubah, with this wording. Muslim also included it, in the Book of Gifts, chapter on the prohibition of taking back a charitable donation after it has been received, except what a person gives to his child or further descendant, hadith 1622, from the hadith of Muhammad bin Bashshar, with this wording.