{"record":{"id":"55bf4273b3c01f3c","repo":"jdx/mise","slug":"incoming-setup-has-not-been-completely-applied-ru","errorCode":null,"errorMessage":"incoming setup has not been completely applied; run `mise bootstrap dotfiles pull` before publishing","messagePattern":"incoming setup has not been completely applied; run `mise bootstrap dotfiles pull` before publishing","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/sync/publish.rs","lineNumber":78,"sourceCode":"                    .collect::<Vec<_>>()\n                    .join(\", \")\n            );\n        }\n        // Accepted choices were validated against saved, live, and remote\n        // versions. Carry their already-encrypted saved objects, not a new\n        // plaintext publication representation.\n        let overlays = conflicts\n            .into_iter()\n            .map(|path| {\n                Ok(crate::system::history::shadow::Overlay {\n                    object: repo.object_at(local, &path)?,\n                    path,\n                })\n            })\n            .collect::<Result<Vec<_>>>()?;\n        let merged = repo.compose(&merged, &overlays)?;\n        if merged != tree {\n            bail!(\n                \"incoming setup has not been completely applied; run `mise bootstrap dotfiles pull` before publishing\"\n            );\n        }\n    }\n    let Some(candidate) = heads.candidate(repo, &tree)? else {\n        return Ok(None);\n    };\n    super::files::audit_history(repo, &candidate.commit, &Default::default())?;\n    candidate.adopt(repo)?;\n    Ok(Some(candidate.commit))\n}\n\npub(crate) fn push(\n    remote: &Remote<'_>,\n    branch: &str,\n    commit: &str,\n    upstream_commit: Option<&str>,\n) -> Result<PushOutcome> {","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/history/sync/publish.rs#L60-L96","documentation":"This error is thrown during `mise bootstrap dotfiles publish` in the history-sync publish flow. After merging the upstream tree with local overlays, the publisher compares the composed merge result against the remote tree; if they differ, it means the local clone has not fully applied (pulled) the incoming setup, so publishing would drop or overwrite incoming changes. mise refuses to publish and tells you to pull first.","triggerScenarios":"Running `mise bootstrap dotfiles publish` while the upstream setup branch contains commits or overlays that the local machine never applied via `mise bootstrap dotfiles pull`; the composed merge (`repo.compose(&merged, &overlays)`) does not equal the upstream tree `tree`.","commonSituations":"Two machines share a dotfiles repository; machine B pushed new dotfiles, and machine A tries to publish its local edits without pulling first. Also happens after manually resetting/removing local tracked files so the merge no longer reproduces the upstream tree.","solutions":["Run `mise bootstrap dotfiles pull` to fully apply the incoming setup, then retry publish","Inspect `git`-style differences reported by `mise bootstrap dotfiles status` and resolve any unapplied incoming files","If the upstream branch is wrong, repoint it with `mise bootstrap dotfiles origin set <url> --branch <name>` before pulling/publishing"],"exampleFix":"// before\n$ mise bootstrap dotfiles publish\nerror: incoming setup has not been completely applied\n\n// after\n$ mise bootstrap dotfiles pull\n$ mise bootstrap dotfiles publish","handlingStrategy":"validation","validationCode":"mise bootstrap dotfiles status && mise bootstrap dotfiles pull && mise bootstrap dotfiles publish","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always `pull` before `publish` when other machines share the setup repository","Check `mise bootstrap dotfiles status` for unapplied incoming changes before publishing"],"tags":["git","sync","dotfiles","state-conflict"],"backgroundTag":"invalid-state-transition","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}