كتاب الحج
15  
The Book of Pilgrimage
(33)
Chapter: It is permissible for the pilgrim performing Umrah to shorten his hair and he does not have to shave it. It is recommended for him to shave his hair or shorten it at Al-Marwah
(33)
باب التَّقْصِيرِ فِي الْعُمْرَةِ ‏
Sahih Muslim 1247

Abu Sa'id (Allah be pleased with him) reported:

We went out with Allah's messenger (ﷺ) pronouncing loudly the Talbiya for Hajj When we came to Mecca, he commanded us that we should change this (Ihram for Hajj) to that of Umra except one who had brought the sacrificial animal with him. When it was the day of Tarwiya (8th of Dhul-Hijja) and we went to Mini, we (again) pronounced Talbiya for Hajj.
حَدَّثَنِي عُبَيْدُ اللَّهِ بْنُ عُمَرَ الْقَوَارِيرِيُّ، حَدَّثَنَا عَبْدُ الأَعْلَى بْنُ عَبْدِ الأَعْلَى، حَدَّثَنَا دَاوُدُ، عَنْ أَبِي نَضْرَةَ، عَنْ أَبِي سَعِيدٍ، قَالَ خَرَجْنَا مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم نَصْرُخُ بِالْحَجِّ صُرَاخًا فَلَمَّا قَدِمْنَا مَكَّةَ أَمَرَنَا أَنْ نَجْعَلَهَا عُمْرَةً إِلاَّ مَنْ سَاقَ الْهَدْىَ فَلَمَّا كَانَ يَوْمُ التَّرْوِيَةِ وَرُحْنَا إِلَى مِنًى أَهْلَلْنَا بِالْحَجِّ ‏.‏
Reference : Sahih Muslim 1247
In-book reference : Book 15, Hadith 231
USC-MSA web (English) reference : Book 7, Hadith 2872
  (deprecated numbering scheme)