Abu Hurairah (May Allah be pleased with him) reported:
The Prophet (ﷺ) said, "I saw a man going about in Jannah (and enjoying himself) as a reward for cutting from the middle of the road, a tree which was causing inconvenience to the Muslims".[Muslim].Another narration says: "A man who passed by a branch of a tree leaning over a road and decided to remove it, saying to himself, 'By Allah! I will remove from the way of Muslims so that it would not harm them.' On account of this he was admitted to Jannah".According to the narration in Al-Bukhari and Muslim: Messenger of Allah (ﷺ) said, "While a man was walking, he saw a thorny branch on the road, so he removed it and Allah appreciated his action and forgave him".
Arabic/English book reference: Book 1, Hadith 127