In 1940 Germany made France sign its surrender in the 1918 railway carriage
Hitler's generals chose their venue with care. The 1940 armistice that split France in two was signed in Compiègne Forest, in the same railway carriage where Germany had surrendered in 1918. Both sides assumed the occupation would be brief, lasting only until Britain made peace. It lasted over four years.
After the rapid German victory of May and June 1940, Wilhelm Keitel for the Reich and Charles Huntzinger for Marshal Philippe Pétain's government signed the terms on 22 June 1940. France was carved into an occupied north and west, run by a German military administration, and an unoccupied south. French prisoners of war were to stay captive until all fighting ended, a condition that made sense only if everyone expected a quick finish.
On paper the new French State, which replaced the collapsed Third Republic, ruled the whole country. In practice the armistice obliged French officials in the occupied zone to obey the German military, and the regime had to sit in the spa town of Vichy because Paris lay on the wrong side of the line. The free zone covered 246,618 square kilometres, roughly 45 percent of France, yet still paid heavy tribute and relied on Germany economically. Crossing the demarcation line required a German pass.
The map had further layers. Alsace-Lorraine, German from 1871 until the First World War, was annexed again, and its men became liable for German conscription. Nord and Pas-de-Calais were run from Brussels, a 20-kilometre strip of the Atlantic coast was closed off, and in a forbidden zone across the north-east refugees were barred from going home because the land was earmarked for German settlers. Italy held a small Alpine zone.
The Allied landings in North Africa on 8 November 1942 changed everything: three days later Germany and Italy marched into the south, and the free zone became the south zone under military rule. When Italy surrendered in September 1943, Germany absorbed the Italian area too, while Corsica was freed by Free French forces. After the Normandy and Provence landings most of France was liberated by late summer 1944, and the administration formally ended that December.
Source: German military administration in occupied France during World War II