Abu Hurairah reported,

The Messenger of Allah ﷺ used to encourage standing in prayer during Ramadan without making it a strict obligation, and he would say, "Whoever stands in prayer during Ramadan out of faith and seeking reward, his previous sins will be forgiven."

Ahmad 10843

Sahih

حدثنا عثمان بن عمر حدثنا مالك عن الزهري عن أبي سلمة

عن أبي هريرة

أن رسول الله ﷺ كان يأمر بقيام رمضان من غير أن يأمر فيه بعزيمة وكان يقول من قام رمضان إيمانا واحتسابا غفر له ما تقدم من ذنبه

أحمد 10843صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abu Hurairah
Numbering
Darussalam 10843
Ahmad 10843