Monstrous Regiment by Terry Pratchett
Polly's brother (her sweet, innocent, artistic brother) left their family's tavern to fight in Borogravia's endless war. When his letters suddenly stop, she wants to go looking for him, but women aren't allowed in the Borogravian army. Undeterred, she chops off her hair, stuffs some socks down her trousers, and joins up anyway, disguised as "Oliver." She's always been told that the Borogravian army is the Discworld's finest, and that they're winning the war, but that's hard to believe when she sees her brothers-in-arms: all oddballs and misfits, untrained and ill-equipped.