‘As for this man, he has told the truth’—meaning that the others were not to be believed. He then shunned him for a time, after which Allah accepted his repentance through the blessing of his truthfulness.”
Making false excuses for oneself and arguing in one’s own defense with falsehood is not permissible. Rather, if someone commits a sin privately, between himself and Allah, he should acknowledge his sin before his Lord, submit to Him in his heart, ask His forgiveness, and turn to Him in repentance. For He is All-Forgiving, Most Merciful, ever accepting of repentance.
If the misdeed was public, he should repent publicly. If he outwardly displayed good while concealing evil, he should inwardly repent of that evil. Whoever does wrong in secret should do good in secret, and whoever does wrong openly should do good openly.
“Indeed, good deeds do away with misdeeds. That is a reminder for those who remember.”