This paper proposes a new cycle slip detection and repair method for a single-frequency GNSS receiver based on epoch difference. Taking the previous and current epoch as base and rover station respectively, posteriori standard errors and residuals of observations were derived from relative positioning and robust estimation. Single-frequency cycle slip detection and repair were carried out as well. Analysis of experiments with measured data suggest that the success rate of detection epochs of cycle slip is 100%, and more than 95% of abnormal satellites can be detected on occasions when the number of observed satellites without cycle slips is more than four and the percentage of the satellites without cycle slips is less than 30%. With an excessive number of abnormal satellites, the success rate of detection descends correspondingly. The success rate of cycle slip repair can reach 100% based on the success of detection of cycle slips.