Sahih al-Bukhari 7201
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
اللَّهُمَّ إِنَّ الْخَيْرَ خَيْرُ الآخِرَهْ فَاغْفِرْ لِلأَنْصَارِ وَالْمُهَاجِرَهْ "
Narrated Anas:
The Prophet (ﷺ) went out on a cold morning while the Muhajirin (emigrants) and the Ansar were digging the trench. The Prophet (ﷺ) then said, "O Allah! The real goodness is the goodness of the Here after, so please forgive the Ansar and the Muhajirin." They replied, "We are those who have given the Pledge of allegiance to Muhammad for to observe Jihad as long as we remain alive."
Full reference and source
Sahih al-Bukhari 7201 In-book : Book 93, Hadith 61 USC-MSA web (English) : Vol. 9, Book 89, Hadith 308 (deprecated)
View source on Sunnah.com (opens in a new tab)