عَنْ أَبِي ذَرٍّ جُنْدَبِ بْنِ جُنَادَةَ، وَأَبِي عَبْدِ الرَّحْمَنِ مُعَاذِ بْنِ جَبَلٍ رَضِيَ اللَّهُ عَنْهُمَا، عَنْ رَسُولِ اللَّهِ صلى الله عليه و سلم قَالَ: اتَّقِ اللَّهَ حَيْثُمَا كُنْت، وَأَتْبِعْ السَّيِّئَةَ الْحَسَنَةَ تَمْحُهَا، وَخَالِقْ النَّاسَ بِخُلُقٍ حَسَنٍ
Meaning: The Messenger of Allah ﷺ said: Fear Allah wherever you are, follow a bad deed with a good one and it will erase it, and treat people with good character.
At-Tirmidhi: hasan. Al-Albani: hasan. Ibn Rajab notes a disagreement over the chain, and that ad-Daraqutni preferred a mursal version.
Narrated by Abu Dharr and Mu'adh ibn Jabal · Jami' at-Tirmidhi 1987