Sahih Muslim Book 7, Hadith Number 3002.

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

‘Abdullah b. ‘Amr b. al-As (Allah be pleased with them) said: As Allah’s Messenger (may peace be upon him) was standing near the jamra, a person came to him on the Day of Nahr and said: Messenger of Allah, I got (my head shaved) before throwing pebbles, whereupon he (the Holy Prophet) said: Throw pebbles (now); there is no harm in it. Another man (then) came and said: I have sacrificed before throwing the stones. He said: Throw stones (now) and there is no harm. Another came to him and said: I have observed the circumambulation of Ifada of the House before throwing pebbles. He said: Throw pebbles (now); there is no harm in it, He (the narrator) said: I did not see that he (the Holy Prophet) was asked about anything on that day, but he said: Do, and there is no harm in it.