Related Rule
Germany
Practice Relating to Rule 37. Open Towns and Non-Defended Localities
Germany’s Military Manual (1992) provides:
A locality shall be considered as non-defended if it has been declared so by its competent authorities, if it is open for occupation and fulfils the following conditions: all combatants, as well as mobile weapons and mobile military equipment, must have been evacuated; no hostile use shall be made of fixed military installations and establishments; no acts of hostility shall be committed by the authorities or by the population; and no activities in support of military operations shall be undertaken. 
Germany, Humanitarian Law in Armed Conflicts – Manual, DSK VV207320067, edited by The Federal Ministry of Defence of the Federal Republic of Germany, VR II 3, August 1992, English translation of ZDv 15/2, Humanitäres Völkerrecht in bewaffneten Konflikten – Handbuch, August 1992, § 459.
The manual refers to Article 59(2) of the 1977 Additional Protocol I. It adds that “a locality shall not on suspicion be deemed non-defended unless the behaviour of the adversary substantiates such a supposition”. 
Germany, Humanitarian Law in Armed Conflicts – Manual, DSK VV207320067, edited by The Federal Ministry of Defence of the Federal Republic of Germany, VR II 3, August 1992, English translation of ZDv 15/2, Humanitäres Völkerrecht in bewaffneten Konflikten – Handbuch, August 1992, § 460.
The manual goes on to say that, if one of the parties to the conflict breaches the provisions concerning the conditions for the establishment of non-defended localities, the locality in question will lose its special protection, even if the protection of the civilian population and civilian objects continue to be applicable. 
Germany, Humanitarian Law in Armed Conflicts – Manual, DSK VV207320067, edited by The Federal Ministry of Defence of the Federal Republic of Germany, VR II 3, August 1992, English translation of ZDv 15/2, Humanitäres Völkerrecht in bewaffneten Konflikten – Handbuch, August 1992, § 462.
Germany’s Military Manual (1992) prohibits “the attack or bombardment of non-defended localities”. 
Germany, Humanitarian Law in Armed Conflicts – Manual, DSK VV207320067, edited by The Federal Ministry of Defence of the Federal Republic of Germany, VR II 3, August 1992, English translation of ZDv 15/2, Humanitäres Völkerrecht in bewaffneten Konflikten – Handbuch, August 1992, § 458.
The manual further provides that grave breaches of IHL are in particular “launching attacks against non-defended localities”. 
Germany, Humanitarian Law in Armed Conflicts – Manual, DSK VV207320067, edited by The Federal Ministry of Defence of the Federal Republic of Germany, VR II 3, August 1992, English translation of ZDv 15/2, Humanitäres Völkerrecht in bewaffneten Konflikten – Handbuch, August 1992, § 1209.
Germany’s Law Introducing the International Crimes Code (2002) provides for the punishment of anyone who, “in connection with an international armed conflict or with an armed conflict not of an international character, … directs an attack by military means against … undefended towns, villages, dwellings or buildings”. 
Germany, Law Introducing the International Crimes Code, 2002, Article 1, § 11(1)(2).