We study the transient response of DNA molecules to sudden changes in the external field during gel electrophoresis, using a reptation model that includes longitudinal fluctuations of the chain in the tube. When the field is suddenly applied, there is an overshoot in the molecular orientation before the steady state is reached, which is related to the formation of U-shaped tube conformations in which the chain is stretched. A corresponding undershoot, when the field is instantaneously inverted, is caused by the reversal of an asymmetry in the typical steady-state configuration. When the field is switched off, the orientation decays with fast and slow components, linked with the relaxation of chain stretching and reptation out of the oriented tube, respectively. The connection between the these transient effects and the mobility of DNA in field-inversion gel electrophoresis (FIGE) is discussed. In particular, the pulsing time at which the dip in mobility occurs is related to the transient orientation time, since the reduction of mobility is caused by the frequent trapping of the molecule in U-shaped conformations.