Sahih Muslim , Hadith 759

Abu Huraira reported Allah's Messenger as saying: He who observed prayer at night during Ramadan, because of faith and seeking his reward from Allah, his previous sins would be forgiven.

حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، قَالَ قَرَأْتُ عَلَى مَالِكٍ عَنِ ابْنِ شِهَابٍ، عَنْ حُمَيْدِ بْنِ عَبْدِ الرَّحْمَنِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ مَنْ قَامَ رَمَضَانَ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ ‏" ‏ ‏.‏

sunnah.com

Abu Huraira reported: The Messenger of Allah used to exhort (his Companions) to pray (at night) during Ramadan without commanding them to observe it as an obligatory act, and say: He who observed the night prayer in Ramadan because of faith and seeking his reward (from Allah), all his previous sins would be forgiven. When Allah's Messenger died, this was the practice, and it continued thus during Abu Bakr's caliphate and the early part of 'Umar's caliphate.

وَحَدَّثَنَا عَبْدُ بْنُ حُمَيْدٍ، أَخْبَرَنَا عَبْدُ الرَّزَّاقِ، أَخْبَرَنَا مَعْمَرٌ، عَنِ الزُّهْرِيِّ، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ، قَالَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُرَغِّبُ فِي قِيَامِ رَمَضَانَ مِنْ غَيْرِ أَنْ يَأْمُرَهُمْ فِيهِ بِعَزِيمَةٍ فَيَقُولُ ‏ "‏ مَنْ قَامَ رَمَضَانَ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ ‏" ‏ ‏.‏ فَتُوُفِّيَ رَسُولُ اللَّهِ صلى الله عليه وسلم وَالأَمْرُ عَلَى ذَلِكَ ثُمَّ كَانَ الأَمْرُ عَلَى ذَلِكَ فِي خِلاَفَةِ أَبِي بَكْرٍ وَصَدْرًا مِنْ خِلاَفَةِ عُمَرَ عَلَى ذَلِكَ ‏.‏

sunnah.com