Synchronize

Compare a site with its Remote server, see every file that differs, choose, and only then move anything.

The dialog

Synchronize... asks the questions of Dreamweaver's Synchronize dialog, each answer preselected from the last time:

  1. What to synchronize: the entire site, or the files chosen in the Explorer. This question appears only when it started from an Explorer selection.
  2. Which way: Put newer files to remote, Get newer files from remote, or Get and put newer files.
  3. Files only on the other side: keep them, or delete them, worded for the direction, such as Delete remote files not on local drive.

The extension then compares both sides, with progress and a Cancel button. Unchanged files are counted, never listed; if nothing differs, a message says the site is in sync.

The Sync Preview

The preview groups the files by what will happen to each, with a count on every group, decisions first:

Groups of the Sync Preview
GroupHolds
ResolveFiles changed on both sides, or differing with no sync record. They have no checkbox until you choose.
Put, GetFiles that move to or from the server, checked.
Delete remote, Delete localFiles the delete option removes. Files never synchronized before start unchecked.
GuardedSensitive files such as .env, unchecked until you check them.
SkipFiles you chose to skip or mark as synchronized.
ErrorsNames that cannot be used on this system, case twins and links, which never move.

The view's heading names the site, the server and the direction; its description gives the summary, such as Files: 36 will be updated, 169 will be skipped, 2 need a decision. The setting syncServers.preview.groupBy groups by folder instead.

Choosing for a file

A file under Resolve offers, inline and in its context menu:

Choosing moves the row to that group, checked. Any row can take the actions its copies allow, including Delete on Server and Delete Local File. Several rows can be chosen at once, and while a preview waits every action is also in the Command Palette, acting on the rows chosen in the view.

Running it

Synchronize Checked Files in the preview's title bar runs the checked rows. Check All, Uncheck All and Close Preview sit beside it.

A notification reports the result, such as Synchronized 36 files. 1 failed. 169 skipped. A clean run closes the preview; a run with failures keeps them in the view with their reasons, and the status bar warns until you close it.

Compare with Remote

Compare with Remote fetches the server's copy into a read-only editor beside the local file, in VS Code's diff editor. For a binary or very large file it shows both copies' sizes, times and SHA-256 hashes, and says whether they match. The server's copy is held in memory only while its editor is open.

Put and Get

Put and Get move the file open in the editor, the files chosen in the Explorer or the Remote Files view, or, from the Sites view, a whole site after a question. They go through the same plan and guards as Synchronize: a file that needs a decision, a held-back file or a delete opens the Sync Preview instead of moving, and Put asks to save open files with unsaved changes first.