The conventional scientific view is that there’s a 50/50 chance of a baby being male or female. The mother has two X chromosomes, and the egg (gamete) must have only one, so the baby must have an X chromosome from the mother. And the father has an X and a Y and must contribute one or the other to each individual sperm (gamete). On the surface, there’s no reason to imagine that either X or Y is more likely… but that does tell us that if there is a gender imbalance (for example, in a family tree), then if there’s a genetic component, it must come from the male side.
Well, a recent study has found that tendencies to have girls or boys genuinely can run in families! And as you’d expect from the logic above, that’s down to the father’s genetic contribution. The math gets a little complicated, but in summary it turns out that there’s a gene controlling the ratio of X and Y gametes. Men with one combination (referred to in the study as mm) produce more Y sperm, while men who are heterozygous (their alleles are different to each other, referred to as mf) produce equal numbers of X and Y gametes, and men who are homozygous for the f allele (ff) produce more daughters.
So if you’re thinking that there are only ever girls in your family, it might be true… as long as you’re looking at the male line’s progeny! Don’t forget though that it’s equally likely that you’re just imagining a trend that doesn’t exist: humans are really, really good at that. Blind luck plays a role as well: if mf alleles run in the family, then the kids can still be all XX or all XY individuals just through chance.