Sahih Muslim Book 7, Hadith Number 2995.

Chapter : Regarding one who shaves before offering the sacrifice or offers sacrifice before throwing (the stones at Jamra).

Abdullah b. ‘Amr b. al-‘As said that Allah’s Messenger (may peace be upon him) stopped during the Farewell Pilgrimage at Mina for people who had something to ask. A man came and said: Messenger of Allah, being ignorant. I shaved before sacrificing, whereupon he (the Holy Prophet) said: Now sacrifice (the animal) and there is no harm (for you). Then another man came and he said: Messenger of Allah, being ignorant, I sacrificed before throwing the pebbles, whereupon he (the Holy Prophet) said: (Now) throw the pebbles, and there is no harm (for you). Allah’s Messenger (may peace be upon him) was not asked about anything which had been done before or after (its proper time) but he said: Do it, and no harm is there (for you).