windmill-labs/windmill · warning
⚠️ WARNING: Current Git branch '${currentBranch}' does not
Error message
⚠️ WARNING: Current Git branch '${currentBranch}' does not match any workspace in the configuration.
Consider adding a workspace entry for branch '${currentBranch}' in the 'workspaces' section of wmill.yaml.
Available workspaces: ${availableInfo} What it means
This warning from `validateBranchConfiguration` fires in non-interactive mode when the current git branch does not match any workspace entry in `wmill.yaml` (checked via `findWorkspaceByGitBranch`, including each entry's effective `gitBranch`). The CLI lists the available workspaces and their branches, then returns without auto-creating anything, so the push/pull will proceed without a branch-resolved workspace configuration (or with whatever fallback the caller applies). It exists because branch→workspace auto-detection is a core convenience of git sync and a missing mapping usually means a misconfigured or freshly created branch.
Source
Thrown at cli/src/core/conf.ts:530
);
return;
}
} else {
// Warn about filesystem-unsafe characters in branch name
if (/[\/\\:*?"<>|.]/.test(currentBranch)) {
const sanitizedBranchName = currentBranch.replace(
/[\/\\:*?"<>|.]/g,
"_"
);
log.warn(
`⚠️ WARNING: Branch name "${currentBranch}" contains filesystem-unsafe characters (/ \\ : * ? " < > | .).`
);
log.warn(
` Branch-specific files will use sanitized name: "${sanitizedBranchName}"`
);
}
log.warn(
`⚠️ WARNING: Current Git branch '${currentBranch}' does not match any workspace in the configuration.\n` +
` Consider adding a workspace entry for branch '${currentBranch}' in the 'workspaces' section of wmill.yaml.\n` +
` Available workspaces: ${availableInfo}`
);
return;
}
}
}
// Get effective settings by merging top-level settings with workspace-specific overrides.
// workspaceNameOverride selects a workspace by name directly.
// When not provided, auto-detects from the current git branch.
export async function getEffectiveSettings(
config: SyncOptions,
promotion?: string,
skipBranchValidation?: boolean,
suppressLogs?: boolean,
workspaceNameOverride?: stringView on GitHub (pinned to e474e8803c)
Solutions
- Add a `workspaces` entry for the current branch in `wmill.yaml` (keyed by branch or with `gitBranch:` set to it).
- Switch to a branch that has a matching workspace entry (`git checkout main`).
- Run with `--workspace <name>` to target a workspace explicitly instead of branch detection.
- Run with `--skip-branch-validation` if branch-based resolution is intentionally unused.
- Verify the `gitBranch` values in `wmill.yaml` for typos (compare against `git branch --show-current`).
Example fix
# before (on branch develop)
workspaces:
main:
gitBranch: main
# after
workspaces:
main:
gitBranch: main
develop:
gitBranch: develop Defensive patterns
Strategy: validation
Validate before calling
// verify branch-to-workspace coverage before push/pull
import { readConfigFile } from "./conf.ts"; // or parse the YAML yourself
const config = await readConfigFile();
const branch = $("git branch --show-current").trim();
const entries = Object.entries(config.workspaces ?? {}) as [string, { gitBranch?: string }][];
const matched = entries.find(([, e]) => (e.gitBranch ?? name0(entries, e)) === branch);
if (!matched) {
console.warn(`Branch "${branch}" not mapped. Available: ${entries.map(([n, e]) => `${n}(${e.gitBranch ?? n})`).join(", ")}`);
}
function name0(entries: [string, unknown][], _e: unknown) { return entries[0][0]; } Prevention
- Add a workspaces entry for every long-lived branch the team syncs from.
- Run a config check in CI comparing the checked-out branch against `wmill.yaml`.
- Use `--workspace` or `--skip-branch-validation` in pipelines where branch detection is meaningless.
- When creating a branch, add its workspace mapping in the same PR.
When it happens
Trigger: `wmill push`/`pull`/`gitsync-settings` in a git repo, workspaces section non-empty, no `--workspace`/`--skip-branch-validation`/`--yes`, `process.stdin.isTTY` falsy, and `getCurrentGitBranch()` (after fork resolution) equals no workspace's effective branch — e.g. branch `develop` while config only maps `main`.
Common situations: Opening a new feature branch with no corresponding `workspaces` entry, CI checking out a PR merge ref, cloning a repo and switching to a branch added after the config was last edited, or a `gitBranch` typo in `wmill.yaml`.
Related errors
- Could not resolve parent workspace. Make sure you are in a g
- ⚠️ WARNING: In a Git repository, the 'workspaces' section i
- ⚠️ WARNING: Multiple workspaces map to git branch '${branch
- ⚠️ WARNING: Workspace creation cancelled. You can manually
- No instance found, please add one first
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/d26dbf787fd24021.
Report an issue: GitHub.