Sahih al-Bukhari, Hadith 7035 ⓘ
Narrated Abu Musa: The Prophet said, "I saw in a dream that I was migrating from Mecca to a land where there were date palm trees. I thought that it might be the land of Al-Yamama or Hajar, but behold, it turned out to be Yathrib (i.e. Medina). And I saw cows (being slaughtered) there, but the reward given by Allah is better (than worldly benefits). Behold, those cows proved to symbolize the believers (who were killed) on the Day (of the battle) of Uhud, and the good (which I saw in the dream) was the good and the reward and the truth which Allah bestowed upon us after the Badr battle. (or the Battle of Uhud) and that was the victory bestowed by Allah in the Battle of Khaibar and the conquest of Mecca).
حَدَّثَنِي مُحَمَّدُ بْنُ الْعَلاَءِ، حَدَّثَنَا أَبُو أُسَامَةَ، عَنْ بُرَيْدٍ، عَنْ جَدِّهِ أَبِي بُرْدَةَ، عَنْ أَبِي مُوسَى، أُرَاهُ عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " رَأَيْتُ فِي الْمَنَامِ أَنِّي أُهَاجِرُ مِنْ مَكَّةَ إِلَى أَرْضٍ بِهَا نَخْلٌ، فَذَهَبَ وَهَلِي إِلَى أَنَّهَا الْيَمَامَةُ أَوْ هَجَرٌ، فَإِذَا هِيَ الْمَدِينَةُ يَثْرِبُ، وَرَأَيْتُ فِيهَا بَقَرًا وَاللَّهُ خَيْرٌ، فَإِذَا هُمُ الْمُؤْمِنُونَ يَوْمَ أُحُدٍ، وَإِذَا الْخَيْرُ مَا جَاءَ اللَّهُ مِنَ الْخَيْرِ وَثَوَابِ الصِّدْقِ الَّذِي أَتَانَا اللَّهُ بِهِ بَعْدَ يَوْمِ بَدْرٍ " .
also referenced under: Book 91, Hadith 50 (In-Book) & Volume 9, Book 87, Hadith 159 (USC-MSA)