Abu Musa Ashari reported,

The Prophet ﷺ said, "I saw in a dream that I was migrating from Mecca to a land containing date palms. My thoughts went to it being Yamamah or Hajar, but it turned out to be the city of Yathrib. In this vision of mine, I also saw that I brandished a sword and its blade broke, and that turned out to be the believers who were struck down on the day of Uhud. Then I brandished it again and it returned better than it had been, and that turned out to be the victory Allah brought about and the gathering of the believers. I also saw cattle in the dream, and Allah is the source of good, and they turned out to be the group of believers killed on the day of Uhud. The good was what Allah brought of good thereafter, and the reward of truthfulness which Allah granted us after the day of Badr."

Azami 8649

Sahih

عن أبي موسى

عن النبي ﷺ قال: رأيت في المنام أني أهاجر من مكة إلى أرض بها نخل، فذهب وهلي إلا أنها اليمامة أو هجر، فإذا هي المدينة يثرب، ورأيت في رؤياي هذه أني هززت سيفا فانقطع صدره، فإذا هو ما أصيب من المؤمنين يوم أحد، ثم هززته أخرى فعاد أحسن ما كان، فإذا هو ما جاء الله به من الفتح واجتماع المؤمنين، ورأيت فيها أيضا بقرا، والله خير فإذا هم النفر من المؤمنين يوم أحد، وإذا الخير ما جاء الله به من الخير بعد، وثواب الصدق الذي آتانا الله بعد يوم بدر.

الأعظمي 8649صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Biography of the Prophet ﷺ
Chapter
Emigration of the Prophet ﷺ and his companions from Makkah to Madinah
Section
Description of the land to which the Messenger of Allah ﷺ would emigrate
Numbering
Jami al-Kamil 8649 (2nd edition)
Azami 8649