How do you train a great dane not to lean on you?
The reason i ask is because i am 5 months pregnant and i don't want it knocking my kid over someday?? We have always heard that danes are a leaning kind of a dog and to them its just a social thing? I don't mind it now but i think my kid will someday?

Don’t push back on your dog. It only engages the opposition reflex and they’ll lean harder. The best thing to do is just step away and say "No lean." Don’t allow the dog to lean on you and it won’t be an issue.
I don’t know if you can teach that
they lean to have contact with you
I hate to say this, but by the time the baby is up and walking- the great dane may no longer be around- they do not have a very long life span- so 2-3 years from now is a long time in their lifeline
When he starts to do that back up a pace or turn your body. Give the "sit" command. And praise
Our Great Dane leans on us, but he doesn’t the children.
If you want him to stop leaning into you give him a slight push when he leans. After a few times he will get the message.
Weirdly enough now that you say it. I’m pregnant also and our Dane hasn’t leaned on my for a long time now.