Take a long-dormant repository and push a commit to it. On the first run, Circle does a history cleanup and throws out all but one of the old commits. On all subsequent runs for the next 30 days, it thinks it should do a cleanup, since the root of GH_PAGES is older than CUTOFF, but the only commit older than KEEP is the existing root commit.
Then the git replace fails because you're telling it to replace the existing root commit with the existing root commit.
Take a long-dormant repository and push a commit to it. On the first run, Circle does a history cleanup and throws out all but one of the old commits. On all subsequent runs for the next 30 days, it thinks it should do a cleanup, since the root of GH_PAGES is older than CUTOFF, but the only commit older than KEEP is the existing root commit.
Then the
git replace
fails because you're telling it to replace the existing root commit with the existing root commit.