Ab initio calculations, based on pseudopotentials and density functional theory, have been performed to investigate the effect of hydrogenation on the atomic geometries and energetics of half-monolayer and full-monolayer coverages of Ge on the Si(001)-(2x1) surface. For the half-monolayer Ge coverage without hydrogenation, we find that the Ge-nondiffused case (i.e., the mixed Ge-Si dimer structure) is 0.25 eV/dimer energetically more favourable than the Ge-interdiffused case (i.e., intermixed Ge-Si bond structure), while for the hydrogenated surface both structures become almost equally favorable. For the full-monolayer coverage of Ge without surface hydrogenation the formation of a pure Ge-Ge dimer is energetically more favourable by 0.19 +/- 0.03 eV/dimer compared with the interdiffusion of Ge into any of the second, third, and fourth substrate layers. The process of surface hydrogenation makes both the nondiffused and interdiffused structures almost equally favorable. In all cases the effect of hydrogenation is to make the surface dimer symmetric and elongated.