Abu Hurairah reported,

The Messenger of Allah ﷺ said, "A man passed by a tree branch lying across a road and said, 'By Allah, I will move this aside so it does not harm the Muslims.' For this he was admitted into Paradise."In another narration, "I saw a man enjoying himself in Paradise on account of a tree he had cut away from the road, which had been harming people."

Azami 14756

Sahih

عن أبي هريرة، قال

قال رسول الله ﷺ: مر رجل بغصن شجرة على ظهر طريق، فقال: والله لأنحين هذا عن المسلمين لا يؤذيهم فأدخل الجنة وفي رواية: لقد رأيت رجلا يتقلب في الجنة، في شجرة قطعها من ظهر الطريق، كانت تؤذي الناس.

الأعظمي 14756صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Superior moral conduct
Chapter
Etiquette of the road, walking, and travel
Section
Virtue of removing harm from the road
Numbering
Jami al-Kamil 14756 (2nd edition)
Azami 14756