I don't mean in the Chumash but which Gemera and where does Rashi say what this means precisely?
It has been suggested to me that Rashi says רֵֽעֲךָ refers to Hashem. Where might that be?
Mi Yodeya is a question and answer site for those who base their lives on Jewish law and tradition and anyone interested in learning more. It only takes a minute to sign up.
Sign up to join this communityI don't mean in the Chumash but which Gemera and where does Rashi say what this means precisely?
It has been suggested to me that Rashi says רֵֽעֲךָ refers to Hashem. Where might that be?
Based on your description, I imagine this a reference to Shabbat 31a:
שׁוּב מַעֲשֶׂה בְּגוֹי אֶחָד שֶׁבָּא לִפְנֵי שַׁמַּאי. אָמַר לוֹ: גַּיְּירֵנִי עַל מְנָת שֶׁתְּלַמְּדֵנִי כׇּל הַתּוֹרָה כּוּלָּהּ כְּשֶׁאֲנִי עוֹמֵד עַל רֶגֶל אַחַת! דְּחָפוֹ בְּאַמַּת הַבִּנְיָן שֶׁבְּיָדוֹ. בָּא לִפְנֵי הִלֵּל, גַּיְירֵיהּ. אָמַר לוֹ: דַּעֲלָךְ סְנֵי לְחַבְרָךְ לָא תַּעֲבֵיד — זוֹ הִיא כׇּל הַתּוֹרָה כּוּלָּהּ, וְאִידַּךְ פֵּירוּשַׁהּ הוּא, זִיל גְּמוֹר.
There was another incident involving one gentile who came before Shammai and said to Shammai: Convert me on condition that you teach me the entire Torah while I am standing on one foot. Shammai pushed him away with the builder’s cubit in his hand. This was a common measuring stick and Shammai was a builder by trade. The same gentile came before Hillel. He converted him and said to him: That which is hateful to you do not do to another; that is the entire Torah, and the rest is its interpretation. Go study.
Rashi:
דעלך סני לחברך לא תעביד - ריעך וריע אביך אל תעזוב (משלי כז) זה הקב"ה אל תעבור על דבריו שהרי עליך שנאוי שיעבור חבירך על דבריך:
Do not do that which is hateful to your fellow - 'Do not forsake your fellow or your father's fellow.' (Proverbs 27:10) This refers to the Holy Blessed One. Do not disobey His commandments, for it is hateful unto you when a friend disobeys yours.
I do note, however, that Rashi is not explicitly linking his comment to the verse ואהבת לרעך כמוך which you mention in your question.