Instant Militia

In Real Time Strategy games, Worker Units are typically weak and can't fend for themselves. In some of those games, however, the player has the option to temporarily convert his workers into many basic fighters to fend off an attack until support arrives. However, the player can use this capability offensively in an early game rush by having both cheap units backed up by these temporary soldiers to overwhelm the opponent.

Video Games

 * Warcraft 3 allows Humans to convert Peasants into Militia that deal around the same damage as a Footman but still retain the same health, though the effect doesn't usually last long enough to reach an enemy base. Meanwhile Orcs can garrison peons into burrows and turn food buildings into temporary towers and the Undead actually use their basic fighters as lumber harvesters so Undead bases always have a militia present. The Night Elves meanwhile, just use their buildings.
 * In addition, the Undead can sacrifice their Acolytes (their other worker unit) to create Shades, which are invisible scouting units. The Night Elf wisps can also Detonate to damage nearby suicide units and take away their Mana.
 * Achron inverts this. Resourcing is automated by "Resource Processors" and all the constructors from all the factions are military units that just happen to have the added bonus ability of being able to drop buildings (or morph into them, in the Grekim's case).
 * Rise of Nations allows the player to upgrade their militia mode(starting with militia, then to minutemen, and finally to partisans) through research available in towers. All nations can convert their citizens into militia mode,
 * Koreans got the technology upgrades for free, La Résistance and turtling being their specialty.
 * Age of Empires can usually garrison villagers inside buildings (especially town centres) and let them fire out of them. The third game also lets you hire minutemen. The "sappers" upgrade is also a specialized version: It gives villagers a quite nasty attack bonus against buildings.
 * Age of Empires II: The Conquerors also gives us the Spanish unique tech, Supremacy, which gives your villagers substantial combat bonuses.
 * The Warchiefs expansion for Age of Empires III adds the Revolution feature, which irreversibly turns all your settlers into colonial militia.
 * Also for Ao E 3: There is a town center function that lets you summon instant militia from it(they count as population but don't convert from peasants) and have an Incurable Cough of Death that drops their HP to One. There's also a Home City card that lets you use a second wave with the same effect. However these "Town Militia" are different from the Colonial Militia you get through a Revolution post Warchiefs as the Colonial variant doesn't lose hitpoints outside of combat
 * Age of Mythology allows the Norse to turn Peasants and Dwarves into Ulfsarks. Notice that it's permanent.
 * Also, Ragnarok immediately makes all your peasants and dwarves special "Heroes of Ragnarok" for free. Either Panic Button or Game Breaker.
 * If you worship Poseidon, your buildings automatically spawn a group of militia when they're destroyed.
 * Civilization IV lets you conscript your populace to quickly crank out some military units in an emergency. The downside is that your city loses population, and it makes the remaining citizens less happy more angry.
 * In the Civ4 mod Fall From Heaven 2, the Doviello civilization has the option to upgrade their workers to (the Doviello equivalent of) Warriors.
 * In Fat Princess, The Worker can damage enemies with his ax that's normally used for building, repairing and resource mining. Once upgraded, he can throw bombs as well.
 * In Warhammer 40,000: Dawn of War, most factions have non-combatant worker units. The Imperial Guard faction has techpriests, who are heavily armored, armed with both a laspistol and a power axe, and can garrison in buildings more efficiently than a guardsmen squad.
 * The Orks take the Night Elf route, as almost all their buildings have point defence weapons mounted on them. They also have invisible Grots.. but they're probably the most pitiful fighters in the game.
 * The Eldar's basic worker unit, the Bonesinger is actually equipped with a sword that can deal a hefty amount of morale damage if nothing else... the game actually had some players using them offensively (since they could teleport) against starting squads to break their morale or tie them up, which was surprisingly effective. The release of Dark Crusade introduced a bug for Imperial Guardsmen that made them unable to inflict morale damage, so a Bonesinger really could just run up and melee them until their pitifully small morale pool was reduced to 0 and rendered them ineffective.
 * The Soulstorm expansion had the Adepta Sororitas worker unit (another Servitor) able to use an ability that did massive damage to a structure after a short delay. Some people even managed to think of a strategy involving rushing their servitors to their opponents' bases to dismantle their structures for a cheap win.
 * Total War games often have this. Recruiting peasants or militia can pretty much save your neck in a pinch in Rome and Medieval - dirt cheap, usually with free upkeep inside cities and generally awful units, but you can bulk up your army numbers with 'em. Empire and Napoleon do it automatically by providing you with 'Firelock armed citizenry' in the event that your cities are attacked.
 * Shogun 2 takes it a step further, as well; all castles come with defensive units when attacked, with upgraded castles getting better and more units. This is probably a way of balancing out the cost of upgrading castles; Shogun's Japanese-style castles are somewhat less defensible than the fortresses of Rome and Medieval.
 * Glest takes it a step further with the Magic faction. All of their Battle Mages (except the one you start with) and Archmages are upgraded from Initiates, who are the faction's basic worker unit.
 * Rohan in The Lord of the Rings: The Battle For Middle Earth does not have regular swordsmen. Instead, they have peasants whose job is to repair damaged structures. One of the researchable powers arms the peasants, turning them into fairly competent militia. This is not temporary, however. Since armies carry over in the campaign, these militia show up again already armed.
 * This is done away in the sequel, where Rohan and Gondor are merged into the Men of the West, and Gondor's foot soldiers take the infantry slot, while the Rohan are relegated into cavalry (Rohirrim being superior to the Gondor knights).
 * Your civilians do this automatically in the turn based strategy Deadlock series when a settlement comes under attack. You can build a bunker for them to hide in instead if you do not want to risk losing civilians.
 * You can conscript your civilian dwarves at-will in Dwarf Fortress. They get rather unhappy from the draft if they have no military skills, and usually aren't terribly effective unless you take the time to arm them. This is mostly done by players who either want to buy some time for another purpose (say, buying time so that the actual military is in place before the invading army arrives), or for players who want to make sure that the dwarves who would run away anyway are more likely to run in the direction the player would prefer.

Tabletop Games
"Shit, what’s scary is that some of these places have security hackers and riggers on duty. Nothing worse than getting a team into a place only to realize there’s a spider—a security rigger—who can jump into the security system and “become” the building. A few weeks back I got into a lab full of skillwired grunts and an alarm got set off. While our hacker was fighting through the building’s system and the rest of us were trying to deal with the security drones, the damn spider downloaded a new set of skillsofts into the grunts. Transformed the bunch from lab grunts to trained security forces. In a matter of seconds, we had 100-plus orks who suddenly knew a hell of a lot about kicking our asses. Needless to say, we left."
 * Star Fleet Battles. In emergencies, starship crew units can be converted into militia (a weaker version of boarding parties) for combat purposes.
 * Mentioned in the Shadowrun in-game discussion.