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

Narrated Ibn `Abbas:

The Prophet (ﷺ) was asked (as regards the ceremonies of Hajj) at Mina on the Day of Nahr and he replied that there was no harm. Then a man said to him, "I got my head shaved before slaughtering." He replied, "Slaughter (now) and there is no harm in it." (Another) man said, "I did the Rami (of the Jimar) after midday." The Prophet (ﷺ) replied, "There was no harm in it."

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