We present a time-dependent analysis of high-order harmonics generated by a self-guided femtosecond laser pulse propagating through a long gas jet. A three-dimensional model is used to calculate the harmonic fields generated by laser pulses, which only differ by the sign of their initial chirp. The time-frequency distributions of the single-atom dipole and harmonic field reveal the dynamics of harmonic generation in the cutoff. A time-dependent phase-matching calculation was performed, taking into account the self-phase modulation of the laser field. Good phase matching holds for only few optical cycles, being dependent on the electron trajectory. When the cutoff trajectory is phase matched, emitted harmonics are locked in phase and the emission intensity is maximized.