Military uniforms differ not only according to military units but tend to also be offered in different levels of formality in accordance with Western dress codes: full dress uniform for formal wear, mess dress uniform for semi-formal wear, service dress uniform for informal wear, and combat uniform (also called “battle/field dress”) which would equal casual wear. There are 3 purpose of military uniform:
Distinctive clothing introduce.
One purpose of military uniforms is to clearly distinguish combatants who are protected by the laws of war from other persons carrying weapons, who do not always enjoy such protection.Another purpose in historical times was to make it difficult for deserters to avoid detection; military uniforms were so distinctive with many metal buttons and unique colours that they could not be modified into unrecognisable clothing. If the commander raised and equipped the troops out of his own pocket, the appearance of the soldiers was also designed to impress his superiors.
During the boxer rebellion, the muslim gansu braves under general dong fuxiang used traditional chinese clothing instead of western-style uniforms, reflecting the opposition of the movement to foreign influences.
The decision to adopt the religious garment as military dress, enforced unity and cohesion among his forces, and eliminated traditional visual markers differentiating potentially fractious tribes. During the years of conflict between mahdist and anglo-egyptian forces at the end of the 19th century, the mahdist military jibba became increasingly stylised and were specifically colour-coded to denote the rank and military division of the wearer.