Language:
كتاب الحج
25  
Hajj (Pilgrimage)
(130)
Chapter: Rami of the Jamra after Maghrib or head shaved before slaughtering the Hadi
(130)
باب إِذَا رَمَى بَعْدَ مَا أَمْسَى أَوْ حَلَقَ قَبْلَ أَنْ يَذْبَحَ نَاسِيًا أَوْ جَاهِلاً
Sahih al-Bukhari 1734

Narrated Ibn `Abbas:

The Prophet (ﷺ) was asked about the slaughtering, shaving (of the head), and the doing of Rami before or after the due times. He said, "There is no harm in that."

حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ، حَدَّثَنَا وُهَيْبٌ، حَدَّثَنَا ابْنُ طَاوُسٍ، عَنْ أَبِيهِ، عَنِ ابْنِ عَبَّاسٍ ـ رضى الله عنهما ـ أَنَّ النَّبِيَّ صلى الله عليه وسلم قِيلَ لَهُ فِي الذَّبْحِ وَالْحَلْقِ وَالرَّمْىِ وَالتَّقْدِيمِ وَالتَّأْخِيرِ فَقَالَ ‏ "‏ لاَ حَرَجَ ‏"‏‏.‏
Reference : Sahih al-Bukhari 1734
In-book reference : Book 25, Hadith 212
USC-MSA web (English) reference : Vol. 2, Book 26, Hadith 790
  (deprecated numbering scheme)