In Ancien Régime France, a nom de guerre (“war name”) would be adopted by each new recruit (or assigned to them by the captain of their company) as they enlisted in the French army. These pseudonyms had an official character and were the predecessor of identification numbers: soldiers were identified by their first names, their family names, and their noms de guerre (e. g. Jean Amarault dit Lafidélité). These pseudonyms were usually related to the soldier’s place of origin (e. g. Jean Deslandes dit Champigny, for a soldier coming from a town named Champigny), or to a particular physical or personal trait (e. g. Antoine Bonnet dit Prettaboire, for a soldier prêt à boire, ready to drink). In 1716, a nom de guerre was mandatory for every soldier; officers did not adopt noms de guerre as they considered them derogatory. In daily life, these aliases could replace the real family name.
Noms de guerre were adopted for security reasons by members of the World War II French resistance and Polish resistance. Such pseudonyms are often adopted by military special-forces soldiers, such as members of the SAS and similar units of resistance fighters, terrorists, and guerrillas. This practice hides their identities and may protect their families from reprisals; it may also be a form of dissociation from domestic life.Wikipedia: Nom de Guerre