Skip to content

Commit 0dcc453

Browse files
committed
sync docs
1 parent 9c2a837 commit 0dcc453

File tree

1 file changed

+4
-27
lines changed

1 file changed

+4
-27
lines changed

docs/advanced/3_cli/sync.mdx

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ local development through the [VS Codeextension](../../cli_local_dev/1_vscode-ex
1818

1919
## Raw Syncing
2020

21+
Raw syncing will soon become the default.
22+
2123
Raw syncing is a one-off operation with no state maintained. When using Windmill EE and [Git Sync](../11_git_sync/index.mdx),
2224
this is what you should use since Git Sync will always keep your git repo up-to-date.
2325
When not used in with Git Sync. It's best used for
@@ -40,6 +42,8 @@ updating the remote equivalents.
4042

4143
## Stateful Syncing
4244

45+
Stateful syncing is currently the default but will soon require the --stateful flag
46+
4347
Stateful syncing is best used when your Git repo and windmill workspace might diverge (because of not using [Git Sync](../11_git_sync/index.mdx))
4448
and you want to keep track of the state the last time you pulled to check for merge conflicts.The CLI will automatically
4549
maintain state for you and ensure modifications that happen concurrently on the remote and locally stay in sync.
@@ -108,30 +112,3 @@ We provide an example repo for syncing with Windmill:
108112

109113
- Syncing with a remote:
110114
[windmill-sync-example](https://github.com/windmill-labs/windmill-sync-example)
111-
112-
## Erasing Remote Files Not Present Locally
113-
114-
In some cases, you may want to ensure that the remote workspace reflects exactly what is present in your local directory, removing any files on the remote that are not present locally. The wmill sync push command provides an option called --skip-pull that allows you to achieve this.
115-
116-
### How it Works
117-
118-
When you use the --skip-pull option with the wmill sync push command, the CLI will push the local changes without performing a pull operation first. It assumes that you have manually performed the pull operation to update the local state.
119-
120-
The command will upload all the local changes to the remote workspace and overwrite any existing remote files. If a file exists on the remote but is not present locally, it will be erased during the push operation.
121-
122-
### Usage
123-
124-
To erase anything on the remote that is not present locally, follow these steps:
125-
126-
1. Make sure you are in the local directory where your files are located.
127-
2. Run the following command to push the local changes and overwrite the remote files:
128-
129-
```bash
130-
wmill sync push --skip-pull
131-
```
132-
133-
This command will upload all the local changes to the remote workspace without checking for any remote changes. Any files on the remote that are not present locally will be erased.
134-
135-
Note: Be cautious when using the --skip-pull option, as it can lead to data loss if used incorrectly. Make sure you have a backup of any important files before using this option.
136-
137-
Using wmill sync push --skip-pull, you can ensure that the remote workspace reflects exactly what is present in your local directory, removing any files on the remote that are not present locally.

0 commit comments

Comments
 (0)