Sunan Abi Dawud, Hadith 4176

Narrated Ibn 'Abbas: The people of the Book used to let their hair hand down, and the polytheists used to part their hair. The Messenger of Allah like to confirm with the People of the Book in the matters about which he had received no command. Hence he Messenger of Allah let his forelock hang down but afterwards he parted it.

حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ، حَدَّثَنَا إِبْرَاهِيمُ بْنُ سَعْدٍ، أَخْبَرَنِي ابْنُ شِهَابٍ، عَنْ عُبَيْدِ اللَّهِ بْنِ عَبْدِ اللَّهِ بْنِ عُتْبَةَ، عَنِ ابْنِ عَبَّاسٍ، قَالَ كَانَ أَهْلُ الْكِتَابِ - يَعْنِي - يَسْدِلُونَ أَشْعَارَهُمْ وَكَانَ الْمُشْرِكُونَ يَفْرُقُونَ رُءُوسَهُمْ وَكَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم تُعْجِبُهُ مُوَافَقَةُ أَهْلِ الْكِتَابِ فِيمَا لَمْ يُؤْمَرْ بِهِ فَسَدَلَ رَسُولُ اللَّهِ صلى الله عليه وسلم نَاصِيَتَهُ ثُمَّ فَرَقَ بَعْدُ ‏.‏

sunnah.com

also referenced under: Hadith 4188 (DarusSalam)