We analyze incommensurate charge-density-wave (CDW) and pair-density-wave (PDW) orders with transferred momenta (±Q,0)/(0,±Q) in underdoped cuprates within the spin-fermion model. Both orders appear due to an exchange of spin fluctuations before magnetic order develops. We argue that the ordered state with the lowest energy has nonzero CDW and PDW components with the same momentum. Such a state breaks C4 lattice rotational symmetry, time-reversal symmetry, and mirror symmetries. We argue that the feedback from CDW/PDW order on fermionic dispersion is consistent with ARPES data. We discuss the interplay between the CDW/PDW order and dx2-y2 superconductivity and make specific predictions for experiments.