(Imām Bukhārī narrates): Mūsā ibn Ismā'īl narrated to us, he said: Wuhaib narrated to us, he said: Ayyūb narrated to us, from 'Ikrimah, from Ibn 'Abbās, may Allāh be pleased with them both, that the Prophet ﷺ was asked about the Hajj. A person said:
I performed the slaughter before throwing the pebbles. He gestured with his hand that there is no harm. A person said: I shaved my head before slaughtering. He gestured with his hand that there is no harm.
Reference: Sahih Al Bukhari 84