وعن أمير المؤمنين أبي حفص عمر بن الخطاب بن نفيل بن عبد العزى بن رياح بن قرط بن رزاح بن عدى بن لؤى ابن غالب القرشى العدوى‏.‏ رضي الله عنه، قال‏:‏ سمعت رسول الله صلى الله عليه وسلم يقول‏:‏ ‏"‏ إنما الأعمال بالنيات، وإنما لكل امرىء ما نوى فمن كانت هجرته إلى الله ورسوله فهجرته إلى الله ورسوله، ومن كانت هجرته لدنيا يصيبها، أو امرأة ينكحها فهجرته إلى ما هاجر إليه‏"‏ ‏(‏‏(‏متفق على صحته‏.‏ رواه إماما المحدثين‏: أبو عبدالله محمد بن إسماعيل بن إبراهيم بن المغيرة بن بَرْدِزْبَهْ الجعفي البخاري، أبو الحسين مسلم بن الحجاج بن مسلم القشيرى النيسابورى رضي الله عنهما في صحيحهما اللذين هما أصح الكتب المصنفة‏)‏‏)‏‏.‏
Copy
'Abdullah bin 'Abbas (May Allah be pleased with them) reported

Messenger of Allah (ﷺ) said that Allah, the Glorious, said: "Verily, Allah (SWT) has ordered that the good and the bad deeds be written down. Then He explained it clearly how (to write): He who intends to do a good deed but he does not do it, then Allah records it for him as a full good deed, but if he carries out his intention, then Allah the Exalted, writes it down for him as from ten to seven hundred folds, and even more. But if he intends to do an evil act and has not done it, then Allah writes it down with Him as a full good deed, but if he intends it and has done it, Allah writes it down as one bad deed".[Al-Bukhari and Muslim].