Hadithcore
Al-Adab Al-Mufrad, 634
hasan· Al-Albani

Anas ibn Malik said, "The Prophet, (ﷺ), took a bough and shook it and not all the leaves fell off. Then he shook it again and not all the leaves fell off. Then he shook it a third time but not all the leaves fell off. He said, 'Saying, "Glory be to Allah and praise be to Allah and there is no god but Allah" makes errors fall away as the leaves of a tree fall away.'"

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

References2 variants
In-Book Reference
Book 31, Hadith 31
English Reference
Book 31, Hadith 634