Most people think that with the signing of the German surrender on May 8, 1945 Germany's government ceased to exist. Believe it or not the Nazi German Government, under the leadership of Grand Admiral Karl Doenitz still existed in Flensburg until May 23, 1945 at which point the allies called a meeting and at the meeting informed Doenitz that as of that day, the German government ceased to exist for all intents and purposes of operations and they were all arrested as prisoners of war. Prior to that point if you were to visit Flensburg and the immediate surrounding area, you'd see German soldiers fully armed marching though town and the Nazi battle flag flying above the government buildings as though no surrender had taken place.
The German government was officially dissolved on June 5, 1945