Vimes basically saves all their asses with his awesomeness and a sack of coffee.
The Reveal at the climax, Sergeant Jackrum convincing the one third of Borogravia's high command by recounting how they are all women who she helped get into power to let Polly's squad go and force the country's first truce, was pretty awesome.
For some reason, this particular line manages to be possibly the most badass line in the entire book:
Jackrum: ...so what is there that I don't know about you... Mildred?
And then realising within a few moments that there's probably more than just that third.
Jackrum stood there, shining like the sunset. The light glinted off his shako badge, polished to the point where it would blind the incautious with its terrible gleam. His face was red, but his jacket was redder, and his sergeant's sash was the pure quill of redness, its very essence, the red of dying stars and dying soldiers. Blood dripped off the cutlasses thrust into his belt.
"Upon my soul, I am not a violent man."
Well, Jackrum is being honest. He's certainly not a violent man...
Lofty's...innovative door-opening strategy.
As part of the book's climax, Shufti finally finds the boy who seduced her and got her pregnant before he shipped off to war. Everything's been set up to this point that she's going to demand he marry her and help her look after their baby. Instead?
Shuft: "I want my sixpence back, you son of a bitch!"
The Girls' Working School mysteriously burns down the same day two slim masked figures rob a bank. And we all wish Tonker and Lofty the best of luck.
Blouse gets several magnificent moments (even besting Jackrum at times) when the mousy, nerdy, naive lieutenant reveals his Hidden Depths:
First when confronted by the captive Captain Horentz (really Prince Heinrich incognito) who blusters threateningly and insultingly to him about his treatment at the squad's hands, demanding to be released at once. Blouse listens quietly then cuts loose with a blistering "The Reason You Suck" Speech.
Blouse: I know you, Captain Horentz. I mean I know your sort. I've had to put up with them all my life. Big jovial bullies, with their brains in their breeches. You dare to come riding into our country and think we're going to be frightened of you? You think you can appeal to me over the heads of my men? You demand? On the soil of my country?
Then when they find the enemy signal group, he calmly restrains Jackrum from attacking until they've finished signaling, then justifies it to a furious Jackrum by pointing out that not only would attacking while they were still transmitting have alerted the enemy that something had happened and caused them to send reinforcements, now they had captured the enemies' signal device and code book without them knowing. He proceeds to leaves Jackrum flabbergasted by giving the orders to set up camp himself.
Jackrum: You just have to say "carry on, sergeant", sir! That's how it works, sir! You tell me what you want and I give 'em the orders! Blouse: Times are changing, sergeant.
Not to mention that it turns out later that Blouse has managed to mentally reverse-engineer the entire klacks system—arguably the most advanced piece of technology on the Disc—purely by observation and logic.
Later when the squad is camping, Blouse calls Jackrum out for directing Wazzer to steal food from William de Worde's cart, which Jackrum calmly defends by citing military rules classifying it as "plundering" from an enemy resource and therefore legitimate. Blouse responds by actually pulling out a copy of the military rulebook and looking it up, then carries on to look up the bogus rule Jackrum invented on the spur of the moment to evade his forced retirement. Just when Polly thinks it's going to come to a fight, Blouse snaps the book shut and congratulates a nonplussed Jackrum on his encyclopaedic knowledge of the rules—he caught Jackrum lying, Jackrum knows he's been caught and subsequently Jackrum knows he's being allowed to get away with it, putting him on the backfoot.
And there was a gleam in his eye. Polly remembered Blouse looking at the captured cavalry captain. This was that same look, the look which said: now I have the upper hand.
In the immediate next scene he executes his master stroke, responding to enemy signals using a modification to the captured signal tube to give the impression he's transmitting disinformation from much further away. When Jackrum strenuously objects, Blouse briefly turns to steel to put him in his place, reminding the squad that despite Jackrum's contempt for "ruperts", he is in command here:
Jackrum: I protest, sir! Blouse: Sergeant, I am about to tell our spy that we are seven miles further away than we really are, do you understand? And I am certain they will believe us because I have artificially reduced the light output from our device, do you understand? And I will tell them that their spies have encountered a very large party of recruits and deserters heading for the mountains and are in pursuit, do you understand? I am making us invisible, do you understand? Do you understand, Sergeant Jackrum?
At the very end the country is going back to war because of inexcusable stupidity (paraphrased from Polly's thoughts). So, after some thought, Polly (1) decides to run away from home again, (2) rejoin the army openly as a woman, fighting the pandering attitudes of the men and disguised women, (3) become essentially a second, more progressive Jackrum, and (4) basically force those in charge to stop being so unforgivably stupid through prolific blackmail and bullying.
When the girls dressed as boys dressed as girls are in danger of not passing while trying to infiltrate the fortress, Shufti — probably the softest, least militaristic girl in the regiment — proves their womanhood by flashing the guards, much to their acute mortification.