Ash-Shama'il Al-Muhammadiyah, Book 3, Hadith 29 (English)

Ibne Abbas R.A. says: "Rasulullah used to leave his hair the way it naturally was, without making a path in the hair (parting hair). The reason being that the mushrikeen (polytheists) used to make a path in their hair, and the Ahlul Kitaab (People of the Book) did not do so. In the early periods Rasulullah preferred to follow the Ahlul Kitaab, rather than others, in matters where no command had came from Allah. Later this was abrogated, and Rasulullah began apposing the ways of the Ahlul Kitaab after this".

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

also referenced under: Book 3, Hadith 30 (In-Book)