And I'm going to stop you right there. There's a difference between a combatant and a front line combatant. The ability to e.g. fire a crossbow doesn't require that much.
At the very least it requires a crossbow. At 25 gp each, this is something that NO ONE in our small village of 10 families would have.
Let me stop you there. In 5e a hill giant is not just slightly bigger than an ogre. They're 16' tall according to the Monster Manual, and huge creatures rather than large. They're actual giants (and it's one of the 5e fluff changes I fully support).
The D&D SRD had them at 10.5’. Forgotten Realms wiki has them at 15’, so I woon’t debate the point.
If the giant is particularly homicidal they get the shepherd/goat herd. But the horn has been sounded.
Village of about 10 families, so there are maybe one or two herds of goats around the village.
Entirely possible that the giant’s approach on the village doesn’t cross the goatherd (in which case, see the surprise scenario), but let’s suppose the giant comes across the goatherd.
Goatherd blows his horn, gets eaten.
We're in hill country and the call has gone out for "giant". The weapons of choice are bows, slings, and javelins with hatchets as a last resort.
The call didn’t go out “Giant!”. A horn was blown, the goatherd was eaten. The villagers don’t currently know if the threat is a wolf or a giant, but they know an unspecified threat has attacked the goatherd.
They were in the fields. They return to their homes to grab weapons. Maybe they have some slings in addition to bows, but they probably don’t have javelins.
If we assume half your "non-combatants" are Str 8 Dex 8 and have slings so can do damage that's still 30 slingstones that need 10 or more to hit (vs AC 11; +2 proficiency, -1 stat bonus); the non-combatants between them do an average of 28.5dpr at short range (accounting for crits) or 13.8 dpr at long range.
Most farmers and homesteaders don’t send their noncombatants out to fight because they don’t want them to die, in addition to the fact that they are well, non combatants.
Also, I would expect that most able folk would have some sort of weapon, but I wouldn’t expect the non-combatants to.
No walls and organised militia needed. Just proficiency with simple weapons and not doing anything stupid.
It isn’t stupid. You are just operating with perfect knowledge of what is happening. You know that the goatherd blew his horn because his flock was attacked by a giant, and not because it was attacked by a wolf, or because the goatherd saw a squad of knights of evil Lord Redrum bearing done on the village. The villagers don’t have that knowledge, so they have to balance the risk of overreacting to a small challenge (their flock gets eaten because they called out the whole village and set out in force) with incorrectly approaching a larger challenge (hiding would be a better approach to a squad of mounted knights).
So what would be the villagers next step? Thanks to the valiant goatherd, the village is in a better scenario than the surprise scenario I described in my previous post. They have advance warning that something is happening, and have time to go home and grab weapons.
So the first group to get ready (maybe 10 or so) head to where the flock generally grazes. At this point, they are still not sure what the threat is, so if they act quickly they believe they might still save their flock. They come across the giant coming in the other direction.
The group has two options. They can attack now, or go back and get reinforcements. If they attack, they will probably win (unless their nerve breaks and they flee), but quite a few of them will die.
If they run back to the village, the giant, with his greater movement, will probably kill a couple of the retreat. They can join up with the other combatants (who are finally ready), and their odds of defeating the giant is pretty good, though quite a few villagers still get killed.