Narrated Abu Qatada reported God’s messenger as saying:
"A good vision comes from God and a dream (hulm) from the devil. So when one of you sees what he likes he must tell it only to one whom he likes; but when he sees What he dislikes he must seek refuge in God from its evil and from the evil of the devil, spit on his left three times, and not tell anyone of it. It will then not harm him.”
Narrated Abu Huraira reported God’s messenger as saying:
"He who sees me in a dream will see me when awake*, for the devil, does not take my likeness.”
(Bukhari and Muslim.)
* This tradition has Caused some difficulty. It is suggested that if it refers to people in the Prophet’s time who have not yet emigrated to Medina, it means that they will emigrate and see the Prophet there; if it refers to people of later times, it means that they will see him in the next world.
Narrated Jabir reported God’s messenger as saying:
"When one of you sees a vision which he dislikes he must spit on his left three times, seek refuge in God from the devil three times, and turn from the side on which he was lying."