If you are expecting a child while studying and receiving a fellowship, DFG and many other foundations in Germany will support you.
For example, fellows who receive a DFG fellowship at GEAS receive a child allowance of €400 per month. The allowance increases by €100 per month for each additional child.
(These allowances are not the same as the child benefit parents may receive from the German Federal State - if you qualify for child benefit, you need to apply at the Familienkasse.)
For parents in receipt of a fellowship, the maximum individual funding period may be extended by up to 12 months if they share a household with their children up to the age of 12 years. If you do not use this extension, or do not use the full extension, you may receive financial resources for childcare instead.
If you are funding your doctorate through a post, the usual statutory requirements and benefits apply. The university is also expected to make suitable childcare measures available. More detailed information is available from the equal opportunity officer at your university.
And, to boast a little: we are one of the few institutes who have a baby chair in the kitchen.