The Messenger of Allah ﷺ used to let his hair hang down loosely. The polytheists used to part their hair, while the People of the Book let their hair hang down loosely, and he liked to align with the People of the Book in matters concerning which he had not been given any instruction. Later, the Messenger of Allah ﷺ parted his hair.
حدثنا علي بن إسحاق قال أخبرنا عبد الله وعتاب قال حدثنا عبد الله قال أخبرنا يونس عن الزهري قال حدثني عبيد الله
أن رسول الله ﷺ كان يسدل شعره وكان المشركون يفرقون رءوسهم وكان أهل الكتاب يسدلون شعورهم وكان يحب موافقة أهل الكتاب فيما لم يؤمر فيه بشيء ثم فرق رسول الله ﷺ رأسه
Both of its chains are sahih. Ahmad narrated it from two teachers, from Ali bin Ishaq and from Itaab bin Ziyad Khurasani, both of them from Abdullah bin Mubarak. This hadith is repeated at 2209 and 2364.