In the first stage of gonadal development, it is impossible to distinguish between the male and female gonad. Thus, it is known as the indifferent stage.
The gonads begin as genital ridges – a pair of longitudinal ridges derived from intermediate mesoderm and overlying epithelium. They initially do not contain any germ cells. Male and female reproductive systems develop in close relation to the urinary tract. Until approximately 7 weeks gestation, the human embryo remains sexually bipotential. Subsequently, in males, testis-inducing factors cause differentiation from the default female phenotype.
References : 1- Netters atals human emberyology (Updated Edition). 2-Human embryology and development biology (6th Edition) . 3- the anatomy of human embryo electron microscope ( 1st Edition ).