Sahih Bukhari | Volume 4 | Hadith Number 818
Narrated by Abu Musa
The Prophet said, "In a dream I saw myself migrating from Mecca to a place having plenty of date trees. I thought that it was Al-Yamama or Hajar, but it came to be Medina i.e. Yathrib. In the same dream I saw myself moving a sword and its blade got broken. It came to symbolize the defeat which the Muslims suffered from, on the Day of Uhud. I moved the sword again, and it became normal as before, and that was the symbol of the victory Allah bestowed upon Muslims and their gathering together. I saw cows in my dream, and by Allah, that was a blessing, and they symbolized the believers on the Day of Uhud. And the blessing was the good Allah bestowed upon us and the reward of true belief which Allah gave us after the day of Badr.