{#if settingsOnly} Pull and apply settings changes from the Git repository to your workspace. This will update your sync filter settings only. {:else} Pull and apply changes from the Git repository to your workspace. If settings changes are detected, you can choose to pull just the settings or everything. {/if}

{#if !settingsOnly} Pulling from the repository will overwrite any local changes to files that exist in the repository. Make sure to preview the changes before applying. {/if} {#if !previewResult}
{/if} {#if previewJobId}
{#if previewJobStatus === 'running'} {:else if previewJobStatus === 'success'} {:else if previewJobStatus === 'failure'} {/if} Preview job: {previewJobId}
{/if} {#if previewError} {previewError} {/if} {#if previewResult && !previewError} {@const settingsChanges = getSettingsChanges(previewResult)} {@const workspaceChanges = getWorkspaceChanges(previewResult)}
{#if settingsChanges.hasChanges && !settingsApplied}

Filter Settings from Repository wmill.yaml

{#if settingsChanges.diff?.diff} {#each Object.entries(settingsChanges.diff.diff) as [field, change]} {@const fieldName = field .replace(/([A-Z])/g, ' $1') .replace(/^./, (str) => str.toUpperCase())} {@const typedChange = change as { from: any; to: any }}
{fieldName}: {#if Array.isArray(typedChange.from) && Array.isArray(typedChange.to)} {typedChange.from.length === 0 ? 'None' : typedChange.from.join(', ')} {typedChange.to.length === 0 ? 'None' : typedChange.to.join(', ')} {:else} {typedChange.from} {typedChange.to} {/if}
{/each} {:else}
Settings changes detected but no detailed diff available.
{/if}
{/if} {#if settingsOnly && !settingsChanges.hasChanges}
No settings changes detected. Your local sync filter settings are already up to date with the repository. See the CLI instructions below on how to edit wmill.yaml
{/if} {#if !settingsOnly && !settingsChanges.hasChanges && workspaceChanges.hasChanges}

Workspace changes to pull

{#if workspaceChanges.hasChanges} {:else}
No changes to pull from the repository.
{/if}
{/if}
{/if} {#if previewResult && !previewError} {@const settingsChanges = getSettingsChanges(previewResult)} {@const workspaceChanges = getWorkspaceChanges(previewResult)} {#if settingsChanges.hasChanges || workspaceChanges.hasChanges}
{#if settingsChanges.hasChanges && workspaceChanges.hasChanges && !settingsApplied}
Step 1 of 2: Apply settings changes
Settings changes detected. Apply these first to ensure workspace content is pulled with the correct configuration.
{:else if settingsChanges.hasChanges && !workspaceChanges.hasChanges && !settingsApplied}
{:else if workspaceChanges.hasChanges && (!settingsChanges.hasChanges || settingsApplied)}
{#if settingsApplied}
Step 2 of 2: Pull Workspace Changes
✓ Settings applied successfully. Now you can pull the workspace changes.
{/if}
{:else}
No changes to pull from the repository.
{/if}
{/if} {/if} {#if applyJobId}
{#if applyJobStatus === 'running'} {:else if applyJobStatus === 'success'} {:else if applyJobStatus === 'failure'} {/if} Pull job: {applyJobId}
{/if} {#if applyError} {applyError} {/if}
{#if showCliInstructions}
{#if settingsOnly}
Filter settings are sourced from the wmill.yaml file in your git repository. To modify them, edit the file in your repository, commit the changes, and sync using the commands below. Learn more about the wmill.yaml format.
{/if}
# Make sure your repo is up to date
git pull

{#if !settingsOnly}# Push from git repository to workspace
wmill sync push --workspace {$workspaceStore} --repository {gitRepoResourcePath}
{:else}# Edit wmill.yaml file
vim wmill.yaml
git add wmill.yaml

{/if}# Commit changes
git commit
git push
{#if settingsOnly}
# Push settings only from git repository or click the pull settings button above{#if currentGitSyncSettings?.repositories?.[repoIndex!]?.use_individual_branch}
wmill gitsync-settings push --workspace {$workspaceStore} --repository {gitRepoResourcePath} --promotion main{:else}
wmill gitsync-settings push --workspace {$workspaceStore} --repository {gitRepoResourcePath}{/if}{/if}
{#if currentGitSyncSettings?.repositories?.[repoIndex!]?.use_individual_branch && settingsOnly}
Promotion Mode Configuration:
You can add promotion-specific overrides in your wmill.yaml file:
gitBranches:
  main:
    promotionOverrides:
      # Add your promotion-specific settings here
							
{/if}
{/if}