diff --git a/gnommo/cli.py b/gnommo/cli.py index 3503632..197e169 100644 --- a/gnommo/cli.py +++ b/gnommo/cli.py @@ -3222,6 +3222,9 @@ def cmd_sync(project_path: Path, verbose: bool, dry_run: bool, download: bool) - "-e", f"ssh -p {server['port']}", *[f"--exclude={p}" for p in _RSYNC_EXCLUDES], + # On upload: delete server-side files that no longer exist locally so + # the remote stays an exact mirror of the local project. + *(["--delete"] if not download else []), src, dest, ]