Of course, you don't edit directly the online version of the site.

You always work in the draft site, and submit the changes to checkout before you (or any privileged user) publish.

This process ensures you always publish a consistent set of pages :

You can save a snapshot of any area of the site at any time, compare or rollback the changes.