Devarim31:7

וַיִּקְרָא מֹשֶׁה לִיהוֹשֻׁעַ וַיֹּאמֶר אֵלָיו לְעֵינֵי כָל־יִשְׂרָאֵל חֲזַק וֶאֱמָץ כִּי אַתָּה תָּבוֹא אֶת־הָעָם הַזֶּה אֶל־הָאָרֶץ אֲשֶׁר נִשְׁבַּע יְהוָה לַאֲבֹתָם לָתֵת לָהֶם וְאַתָּה תַּנְחִילֶנָּה אוֹתָם׃

And Moshe called Yehoshua and said to him before the eyes of all Israel: "Be strong and courageous, for you shall come with this people into the land which the Eternal swore to their fathers to give them, and you shall give it to them as an inheritance.

Devarim 31:7

וַיִּקְרָא מֹשֶׁה לִיהוֹשֻׁעַ

Devarim / Deuteronomy 31:7 · Pshat

Devarim 31:7

וַיִּקְרָא מֹשֶׁה לִיהוֹשֻׁעַ וַיֹּאמֶר אֵלָיו לְעֵינֵי כָל־יִשְׂרָאֵל חֲזַק וֶאֱמָץ כִּי אַתָּה תָּבוֹא אֶת־הָעָם הַזֶּה אֶל־הָאָרֶץ אֲשֶׁר נִשְׁבַּע יְהוָה לַאֲבֹתָם לָתֵת לָהֶם וְאַתָּה תַּנְחִילֶנָּה אוֹתָם׃

And Moshe called Yehoshua and said to him before the eyes of all Israel: "Be strong and courageous, for you shall come with this people into the land which the Eternal swore to their fathers to give them, and you shall give it to them as an inheritance.

Pshat פְּשָׁט

Coming in with the people

A task can be handed to a student in different ways: "you will be with them" or "you will lead them". Moshe (Moses) tells Yehoshua (Joshua) "you shall come with this people", and a few verses later the Eternal will say "you shall bring". The commentators weigh the difference.

Rashi: Moshe said: the elders will be with you, everything by their counsel. But the Eternal said "you shall bring": everything depends on you, one leader for a generation. Malbim: Yehoshua will come in together with the people, as an equal, for the land is given because of the oath to the fathers. Chizkuni: speaking before everyone's eyes, Moshe gave the people honour.

How Rashi, Malbim, and Chizkuni explain it

Rashi For you shall come with this people

As Onkelos has it: "for you shall come with this people". Moshe said to Yehoshua: the elders of the generation will be with you, everything according to their opinion and counsel. But the Holy One, blessed is He, said to Yehoshua: "for you shall bring the children of Israel into the land which I swore to them" (Devarim / Deuteronomy 31:23). Bring them even against their will, everything depends on you. Take a stick and strike them on the head. One leader for a generation, and not two leaders for a generation.

Malbim And Moshe called Yehoshua

First he spoke with the people and said the praise of Yehoshua not in his presence, and afterwards he called him and told him in what he would differ from all the people. "For you shall come with this people" means with the people as an equal, for coming into the land is because the Eternal swore to the fathers.

Chizkuni For you shall come with this people

Since here Moshe was speaking with Yehoshua before the eyes of all Israel, he gave Israel a share of honour, that is: you shall come together with this people.

Takeaway

Onkelos renders "you shall come" (תָּבוֹא) as "you shall enter" (תֵּעוּל): like Rashi, he reads "with this people" as beside them, not ahead of them.
Verse 31:23 says otherwise: "you shall bring" (תָּבִיא). One letter changes the role: to come in together or to bring after you.
For Malbim, Moshe first praises Yehoshua before the people in his absence (verses 31:3–6), and then calls him himself.
The word "head" (קָדְקֹד) in Rashi is an image of a firm hand, not a call to beatings: one person decides, and the people do not pull him in different directions.