Pretty self explanatory question. I guess.
Hitler appointed Admiral Karl Doenitz as his successor. Doenitz permitted Germany to surrender one week after Hitler's death. After that the German government was dissolved and the occupying powers ruled Germany directly