Electronic structures of hydrogen-passivated germanium nanowires (GeNWs) along the [100], [110], [111], and [112] directions are studied by using the density functional theory within the generalized gradient approximation. The band gaps of the fully relaxed GeNWs along the [100], [110], and [111] directions are all direct at the smaller sizes, while those of the wires along the [112] direction remain indirect. The magnitude of the band gaps of the GeNWs for a given size approximately follows the order of E(g)[100] > E(g)[111] > E(g)[112] > E(g)[110]. Compared with silicon nanowires, GeNWs exhibit stronger quantum confinement effects. Replacement of H by the more stable ethine group is found to lead to a weakening of the quantum confinement effects of GeNWs.