Dear Michael,
Welcome to the Wefugees Community and thank you for reaching out to us.
Your situation sounds really complicated to me. As you are not married to your partner, a reunion to your girlfriend is not possible (especially since she can not get married again as long as she is not divorced).
I am not a lawyer and especially not an expert on family law. But as far as I know, according to German law, your girlfriend's husband will be the child's father in the first place (as long as they are not officially divorced). It will be a quite complex procedure as you, your girlfriend or her husband need to contest the paternity in court within two years after the birth. This is the only way for you to be recognized as father. Then it will also depend on the residence permit of your child and other factors if a family reunification is possible in general.
I am sorry that I can not give you more positive information, but I would highly recommend your girlfriend to get some legal counselling and individual support (also regarding her general situation). There are many counselling organisations in Germany which offer confidential and free of charge support (like pregnancy and migration counsellig services). Please let us know if she needs help in finding such an office - we are happy to make some research.
In any case, please also don't hesitate to get back too us with any further questions.
All the best,
Meike