Abdullah bin Zayd reported,

The Prophet ﷺ said, "Were it not for the Hijrah, I would have been a man of the Ansar. If the people were to take one valley or mountain pass, and the Ansar took another, I would take the valley and pass of the Ansar."Abu Tayah corroborated this from Anas, from the Prophet ﷺ, regarding the mountain pass.

Bukhari 7245

Sahih

حدثنا موسى حدثنا وهيب عن عمرو بن يحيى عن عباد بن تميم

عن عبد الله بن زيد

عن النبي ﷺ قال لولا الهجرة لكنت امرأ من الأنصار ولو سلك الناس واديا أو شعبا لسلكت وادي الأنصار وشعبها تابعه أبو التياح عن أنس عن النبي ﷺ في الشعب

البخاري 7245صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Wishing
Chapter
What is permissible of saying "if only"
Numbering
Darussalam 7245
Bukhari 7245