كتاب المساقاة
22  
The Book of Musaqah
(2)
Chapter: The Virtue of Planting and Cultivating
(2)
باب فَضْلِ الْغَرْسِ وَالزَّرْعِ ‏‏
Sahih Muslim 1552 a

Jabir (Allah be pleased with him) reported Allah's Messenger (ﷺ) as saying:

Never does a Muslim plants a tree except that he has the reward of charity for him, for what is eaten out of that is charity; what is stolen out of that, what the beasts eat out of that, what the birds eat out of that is charity for him. (In short) none incurs a loss to him but it becomes a charity on his part.
حَدَّثَنَا ابْنُ نُمَيْرٍ، حَدَّثَنَا أَبِي، حَدَّثَنَا عَبْدُ الْمَلِكِ، عَنْ عَطَاءٍ، عَنْ جَابِرٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ مَا مِنْ مُسْلِمٍ يَغْرِسُ غَرْسًا إِلاَّ كَانَ مَا أُكِلَ مِنْهُ لَهُ صَدَقَةٌ وَمَا سُرِقَ مِنْهُ لَهُ صَدَقَةٌ وَمَا أَكَلَ السَّبُعُ مِنْهُ فَهُوَ لَهُ صَدَقَةٌ وَمَا أَكَلَتِ الطَّيْرُ فَهُوَ لَهُ صَدَقَةً وَلاَ يَرْزَؤُهُ أَحَدٌ إِلاَّ كَانَ لَهُ صَدَقَةٌ ‏"‏ ‏.‏
Reference : Sahih Muslim 1552a
In-book reference : Book 22, Hadith 7
USC-MSA web (English) reference : Book 10, Hadith 3764
  (deprecated numbering scheme)