Sahih Bukhari Volume 9, Book 89, Hadith Number 308.

Narrated By 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 Hereafter, 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.”