Ibn Abbas reported: The Messenger of Allah, peace and blessings be upon him, would let his hair hang down, while the idolaters would part their hair. The People of the Book would let their hair hang down, and the Prophet liked to agree with the People of the Book in matters for which he received no divine commandments. Then, later on he would part his hair.
Source: Ṣaḥīḥ al-Bukhārī 3558, Ṣaḥīḥ Muslim 2236
Grade: Muttafaqun Alayhi (authenticity agreed upon) according to Al-Bukhari and Muslim
Imam al-Qastallani commented, “The Prophet liked to agree with the People of the Book in matters for which he received no divine commandments, because that is closer to the truth than the idolaters who worshiped statues.”
Source: Irshād al-Sārī 8/415
عَنْ ابْنِ عَبَّاسٍ رَضِيَ اللَّهُ عَنْهُمَا أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ كَانَ يَسْدِلُ شَعَرَهُ وَكَانَ الْمُشْرِكُونَ يَفْرُقُونَ رُءُوسَهُمْ فَكَانَ أَهْلُ الْكِتَابِ يَسْدِلُونَ رُءُوسَهُمْ وَكَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يُحِبُّ مُوَافَقَةَ أَهْلِ الْكِتَابِ فِيمَا لَمْ يُؤْمَرْ فِيهِ بِشَيْءٍ ثُمَّ فَرَقَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ رَأْسَهُ
3558 صحيح البخاري كتاب المناقب باب صفة النبي صلى الله عليه وسلم
2236 صحيح مسلم كتاب الفضائل باب في سدل النبي صلى الله عليه وسلم شعره وفرقه
قال القسطلاني يحب موافقة أهل الكتاب فيما لم يؤمر فيه بشيء لأن ذلك أقرب إلى الحق من المشركين عبدة الأوثان
8/415 إرشاد الساري لشرح صحيح البخاري