Question: Do I need to affix a mezuza to my garage? If so, do I recite the beracha?
Answer: The Gemara (Yuma 11a) teaches that there is a machlokes as to whether storehouses require a mezuza.
Rambam (Tefillin, Mezuza Vesefer Torah 6:7) writes that storage houses containing wood and grain, etc. do not require a mezuza. Nonetheless, the Rosh (Mezuza 15), Tur (YD 286:1) and Shulchan Aruch (YD 286:2) writes that one is obligated to affix a mezuza to such rooms (with a beracha).
The Aruch Hashulchan (YD 286:8-9) questions why we recite a beracha, though notes that this is accepted practice.
R’ Moshe Stern (Baer Moshe 2:82) writes that garages only require mezuzos if they are also used for storage. R’ Yitzchak Yaakov Weiss (Minchas Yitzchak 10:96:2) and R’ Moshe Sternbuch (Teshuvos Vehanhagos 1:647) write that one only says a beracha on a garage that is attached to the house, thereby serving as an entrance to the house.
Nonetheless, R' Binyamin Zilber (Az Nidberu 3:58) writes
that R’ Moshe Feinstein and R’ Yosef Eliyahu Henkin maintained that a garage
requires a mezuza regardless as to whether it is connected to the house
or freestanding. Similarly, R’ Menashe Klein (Mishne Halachos 6:189:4) writes
that storehouses require mezuzos. As this halacha is not well
known, one must ensure that they know about it.
In conclusion, one should affix a mezuza to a garage with a beracha.