Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:854ʿAbdullāh b. Muḥammad > Abū ʿĀṣim > Ibn Jurayj > ʿAṭāʾ > Jābir b. ʿAbdullāh

I heard Jabir bin ʿAbdullah saying, "The Prophet ﷺ said, 'Whoever eats (from) this plant (he meant garlic) should keep away from our mosque." I said, "What does he mean by that?" He replied, "I think he means only raw garlic."  

البخاري:٨٥٤حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مُحَمَّدٍ قَالَ حَدَّثَنَا أَبُو عَاصِمٍ قَالَ أَخْبَرَنَا ابْنُ جُرَيْجٍ قَالَ أَخْبَرَنِي عَطَاءٌ قَالَ سَمِعْتُ جَابِرَ بْنَ عَبْدِ اللَّهِ قَالَ قَالَ

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