This paper concerns the theoretical, numerical, and experimental study of the second-harmonic-generation (SHG) process under conditions of phase and group-velocity mismatch and aims to demonstrate the dimensionality transition of the SHG process caused by the change of the fundamental wave diameter. We show that SHG from a narrow fundamental beam leads to the spontaneous self-phase-matching process with, in addition, the appearance of angular dispersion for the off-axis frequency components generated. The angular dispersion sustains the formation of the short X pulse in the second harmonic (SH) and is recognized as three-dimensional (3D) dynamics. On the contrary, the large-diameter fundamental beam reduces the number of the degrees of freedom, does not allow the generation of the angular dispersion, and maintains the so-called one-dimensional (1D) SHG dynamics, where the self-phase-matching appears just for axial components and is accompanied by the shrinking of the SH temporal bandwidth, and sustains a long SH pulse formation. The transition from long SH pulse generation typical of the 1D dynamics to the short 3D X pulse is illustrated numerically and experimentally by changing the conditions from the self-defocusing to the self-focusing regime by simply tuning the phase mismatch. The numerical and experimental verification of the analytical results are also presented.