The Swiss flag as we know it today Historians believe that the white cross on the flag had its origin during the Battle of Laupen of 1339 when troops of the Old Swiss Confederacy, an early confederacy made up of small states which were a precursor of modern Switzerland.
With all the shapes and forms the flag could take we know it as square. The soldiers from all different cantons decided on unifying the crosses with a red background. In 1815, Swiss battalions created flags with the white cross and the red background. As the sign on the clothings was square they took the square form to the flag. Honouring this, the Swiss flag kept being ... square!
Four of these flags were made in 1815, and officially given to the four line battalions formed from soldiers returning from French service on 12 October 1815. One of these four original flags is on exhibit in the National Museum in Zurich. The flag has a sword with laurel in the vertical bar of the cross, and the inscription "Für Vaterland und Ehre" (pro patria et honore) in the horizontal. The inscription is in golden letters. On the reverse side, the flag is inscribed with "Schweizerische Eidgenossenschaft".
So what is the relationship with the Swiss flag and the red cross flag?
The red cross emblem was adopted under the original Geneva Convention of 1864. It’s an inversion of the Swiss flag (a white cross on a red background). This recognises the historic connection between Switzerland and the original Geneva Convention. The red cross emblem has no intentional religious meaning. However, in the nineteenth century, the symbol reminded soldiers from the Ottoman Empire (modern-day Turkey) of the crusaders of the Middle Ages. So, since 1876, some countries have used a red crescent emblem in the same way as other countries used the red cross emblem.
Image sources: Wikimedia