The ground states of the two-dimensional repulsive Hubbard model are studied within the unrestricted Hartree–Fock (UHF) theory. Magnetic and charge properties are determined by systematic, large-scale, exact numerical calculations, and quantified as a function of electron doping, h. In the solution of the self-consistent UHF equations, multiple initial configurations and simulated annealing are used to facilitate convergence to the global minimum. New approaches are employed to minimize finite-size effects in order to reach the thermodynamic limit. At low to moderate interacting strengths and low doping, the UHF ground state is a linear spin-density wave (l-SDW), with antiferromagnetic order and a modulating wave. The wavelength of the modulating wave is 2/h. Corresponding charge order exists but is substantially weaker than the spin order, hence holes are mobile. As the interaction is increased, the l-SDW states evolve into several different phases, with the holes eventually becoming localized. A simple pairing model is presented with analytic calculations for low interaction strength and small doping, to help understand the numerical results and provide a physical picture for the properties of the SDW ground state. By comparison with recent many-body calculations, it is shown that, for intermediate interactions, the UHF solution provides a good description of the magnetic correlations in the true ground state of the Hubbard model.