Jabir bin Abdullah reported,

The Prophet ﷺ said, "Whoever eats from this tree," meaning garlic, "should not come near our mosques."I asked, "What did he mean by that?"He replied, "I think he meant only when it is raw."Makhlad bin Yazid, narrating from Ibn Jurayj, said, "Only its foul smell."

Bukhari 854

Sahih

حدثنا عبد الله بن محمد قال حدثنا أبو عاصم قال أخبرنا ابن جريج قال أخبرني عطاء قال سمعت

جابر بن عبد الله قال

قال النبي ﷺ من أكل من هذه الشجرة يريد الثوم فلا يغشانا في مساجدنا قلت ما يعني به قال ما أراه يعني إلا نيئه وقال مخلد بن يزيد عن ابن جريج إلا نتنه

البخاري 854صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Adhan
Chapter
Raw garlic, onions, and leeks
Numbering
Darussalam 854
Bukhari 854