From 1939 until 1940, the French Third Republic was at war with Germany.
The period from 1940 until 1945 saw competition between Vichy France and the Free French Forces under General Charles de Gaulle for control of the overseas empire.
In 1944, after the landings of the Allies in France (Normandy, Provence), they expelled the German Army, putting an end to the Vichy Regime.
France and Britain declared war on Germany when Germany invaded Poland in September 1939. After the Phoney War from 1939 to 1940, within seven weeks, the Germans invaded and defeated France and forced the British off the continent. France formally surrendered to Germany.
In August 1943, the de Gaulle and Giraud forces merged in a single chain of command subordinated to Anglo-American leadership, meanwhile opposing French forces on the Eastern Front were subordinated to Soviet or German leaderships. This in-exile French force together with the French Forces of the Interior (FFI) played a variable-scale role in the eventual liberation of France by the Western Allies and the defeat of Vichy France, Fascist Italy, Nazi Germany, and the Japanese empire.
Vichy France fought for control over the French overseas empire with the Free French forces, which were helped by Britain and the U.S. By 1943, all of the colonies, except for Indochina, had joined the Free French cause.
The number of Free French troops grew with Allied success in North Africa and subsequent rallying of the Army of Africa which pursued the fight against the Axis fighting in many campaigns and eventually invading Italy, occupied France and Germany from 1944 to 1945 by demanding unconditional surrender to the Axis Powers in the Casablanca Conference.
On October 23, 1944, Britain, the United States, and the Soviet Union officially recognized de Gaulle’s regime as the Provisional Government of the French Republic (GPRF) which replaced the in-exile Vichy French State (its government having fled to Sigmaringen in western Germany) and preceded the Fourth Republic (1946).
Recruitment in liberated France led to enlargements of the French armies. By the end of the war in Europe in May 1945, France had 1,250,000 troops, 10 divisions of which were fighting in Germany.
An expeditionary corps was created to liberate French Indochina then occupied by the Japanese. During the course of the war, French military losses totaled 212,000 dead, of which 92,000 were killed through the end of the campaign of 1940, 58,000 from 1940 to 1945 in other campaigns, 24,000 lost while serving in the French resistance, and a further 38,000 lost while serving with the German Army (including 32,000 “malgré-nous“).