“asked of Yahweh.” Likely by going to the priests or the High Priest.
“go up for us first.” That is, who will lead the charge. The text is not saying that Judah will attack and the other tribes hang back, but rather that the troops of Judah will be up front in the battle. God chooses Judah to take the lead, and this is somewhat typological of Judah’s lead over the tribes, especially in light of the Messiah being from Judah. We see this again in Judges 20:18-19 when Judah is chosen to go first but all the tribes of Israel participate in the battle.