Abdullah bin Abbas reported,

The Prophet ﷺ used to let his hair hang loose over his forehead, while the polytheists used to part their hair. The Prophet ﷺ liked to conform to the People of the Book in matters about which he had received no revelation, so the Messenger of Allah ﷺ let his hair hang loose at first. Later, he parted his hair.

Ahmad 2942

Sahih

حدثنا عثمان بن عمر حدثنا يونس عن الزهري عن عبيد الله بن عبد الله

عن ابن عباس

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

أحمد 2942صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abdullah bin Abbas bin Abdul-Muttalib
Numbering
Darussalam 2942
Ahmad 2942