We show that the spins of all electrons, each confined in a quantum dot of an (In,Ga)As/GaAs dot ensemble, can be driven into a single mode of precession about a magnetic field. This regime is achieved by allowing only a single mode within the electron spin precession spectrum of the ensemble to be synchronized with a train of periodic optical excitation pulses. Under this condition a nuclei induced frequency focusing leads to a shift of all spin precession frequencies into the synchronized mode. The macroscopic magnetic moment of the electron spins that is created in this regime precesses without dephasing.