The Messenger of Allah ﷺ said to me, "Fear Allah wherever you are, follow a bad deed with a good one and it will erase it, and treat people with good character."
حدثنا محمد بن بشار حدثنا عبد الرحمن بن مهدي حدثنا سفيان عن حبيب بن أبي ثابت عن ميمون بن أبي شبيب
قال لي رسول الله ﷺ اتق الله حيثما كنت وأتبع السيئة الحسنة تمحها وخالق الناس بخلق حسن
[Hasan] Ahmad reported it in 153/5 through the narration of Abdul-Rahman bin Mahdi, but its chain is daif. The hadith has supporting narrations in Tirmidhi, no. 2003, and elsewhere, and Hakim graded it sahih according to the criteria of the two Shaykhs, 54/1, and Dhahabi agreed with him.There is also a version on this subject from Abu Hurairah [he is perhaps referring to the earlier hadith, no. 1964].The narration of Abu Naeem from Sufyan was reported by Darimi in 323/2, no. 2794.