Revisions

Every deploy creates a revision—a complete, immutable snapshot of your project with its own permanent preview URL. Production is just a pointer at one of them, and the revision commands move that pointer. Shipped something broken? You're one command from the previous version.

Listing revisions

surge list without a domain lists all your projects. With a domain, it lists that project's revisions, newest last:

$ surge list example.com

   1719765600000.example.com   2 days ago   you@example.com   42 files   1.2 MB   new hero section
   1719852000000.example.com   3 hours ago  you@example.com   42 files   1.2 MB   fix nav on mobile

The revision currently serving production is highlighted. Each row shows the revision's preview URL, its age, who published it, its size, and the deploy message—write good messages and this becomes your deploy log.

Moving between revisions

surge rollback example.com    # serve the previous revision
surge rollfore example.com    # serve the next revision
surge cutover  example.com    # serve the latest revision
$ surge rollback example.com

   ⟲ Rollback

   Done! - example.com now serving revision 1719765600000.example.com
  • rollback steps production one revision back. Run it again to go back further.
  • rollfore steps production one revision forward—the undo for a rollback.
  • cutover jumps production to the latest revision, or to a specific one: surge cutover example.com 1719765600000. This is how a preview deploy ships.

All three are pointer moves on the CDN—no upload, no rebuild, effective immediately. If the pointer is already where you asked it to go, the command reports Unchanged and does nothing.

Note that publishing normally cuts over automatically: a rolled-back project that receives a fresh surge deploy will serve the new deploy. To upload without cutting over, use --preview.

Discarding revisions

Remove a revision from the system entirely:

surge discard example.com 1719852000000

If the discarded revision was serving production, production moves to a neighboring revision (the CLI reports which way it went). Discard the only revision and the project goes offline.

Tearing down a project

To take a project down completely—every revision, gone from every edge node:

surge teardown example.com
   Success - example.com has been removed.

Teardown removes the project from your account. It doesn't touch DNS records or your domain registration, so republishing to the same domain later works exactly like the first publish.