To enter the Special Administrative Region (SAR) of Hong Kong and the SAR of Macau you need a valid passport. On entry German nationals receive a tourist visa which is valid for 3 months. This visa is, however, not valid for travels into Mainland China. To enter the P.R. of China you will need a Chinese visa for which you have to apply before the journey at the Chinese Embassy or one of the Chinese Consulates General in Germany.
For further enquiries please refer to:
Visa Section of the Consular Department of the Commissioner's Office of China's Foreign Ministry in the Hong Kong SAR
A lot of German tourists and businessmen travel via Hong Kong to other destinations in Southeast Asia. Please be aware that for most of these countries your passport has to be valid for at least another 6 months after your journey (e.g. Philippines, Thailand, Malaysia, Indonesia, Taiwan). Please refer to the immigration authorities of the respective countries for details.