{"record":{"id":"415eb351829dfb8e","repo":"gitbutlerapp/gitbutler","slug":"other-is-not-a-conflicted-uncommitted-file-b","errorCode":null,"errorMessage":"'{other}' is not a conflicted uncommitted file; `but resolve` takes either one commit or only conflicted files (see `but status`).","messagePattern":"'(.+?)' is not a conflicted uncommitted file; `but resolve` takes either one commit or only conflicted files \\(see `but status`\\)\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/but/src/command/legacy/resolve.rs","lineNumber":43,"sourceCode":"pub(crate) fn handle(\n    ctx: &mut Context,\n    out: &mut OutputChannel,\n    cmd: Option<Subcommands>,\n    targets: Vec<String>,\n    ai: bool,\n) -> Result<()> {\n    // Conflicted uncommitted files are marked resolved; anything else is a commit.\n    let conflicted_paths = if targets.is_empty() {\n        Vec::new()\n    } else {\n        conflicted_worktree_paths(ctx)?\n    };\n    let commit_id = match targets.as_slice() {\n        [] => None,\n        [target] if !conflicted_paths.contains(target) => Some(target.clone()),\n        _ => {\n            if let Some(other) = targets.iter().find(|t| !conflicted_paths.contains(t)) {\n                bail!(\n                    \"'{other}' is not a conflicted uncommitted file; `but resolve` takes either one commit or only conflicted files (see `but status`).\"\n                );\n            }\n            if ai {\n                bail!(\n                    \"Conflicted uncommitted files can only be marked as resolved: `but resolve <path>...`\"\n                );\n            }\n            return mark_worktree_conflicts_resolved(ctx, out, targets);\n        }\n    };\n    if ai {\n        if cmd.is_some() {\n            bail!(\n                \"--ai cannot be combined with a resolve subcommand. For one conflict, use `but resolve apply <path>[:<N>] --ai` instead.\"\n            );\n        }\n        return resolve_with_ai(ctx, out, commit_id.as_deref());","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but/src/command/legacy/resolve.rs#L25-L61","documentation":"`but resolve` accepts either exactly one commit ID or a list of uncommitted file paths, and the path form requires every path to be currently conflicted — having non-unmerged index entries (stage != Unconflicted, see `conflicted_worktree_paths` in resolve.rs:113-122). If any supplied path is not in that conflicted set, the command bails naming the first offender.","triggerScenarios":"Passing a path that is no longer conflicted (resolved by an IDE or another tool in between), a typo'd or differently-quoted path (e.g. an added `./` prefix), or mixing a commit ID together with file paths in one invocation.","commonSituations":"Conflict state changing between checking status and running resolve; IDEs auto-resolving or reformatting files; Windows path-separator or quoting differences; stale copy-paste from an older conflict list.","solutions":["List the currently conflicted files (`but resolve conflicts` or `git status`) and copy paths exactly.","Re-check that the files still show as conflicted immediately before running resolve.","If you meant a commit's conflicts, pass only that single commit ID — never mixed with paths."],"exampleFix":"# before\nbut resolve src/lib.rs    # already resolved by the IDE -> not a conflicted uncommitted file\n\n# after\nbut resolve conflicts     # list what is actually conflicted now\nbut resolve src/other.rs  # copy the exact path from that list","handlingStrategy":"validation","validationCode":"# Only pass paths that are conflicted right now\nbut resolve conflicts | grep -F '<path>' || { echo 'not currently conflicted'; exit 2; }\nbut resolve '<path>'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Re-list conflicts immediately before resolving; conflict state changes under you.","Pass paths exactly as printed (no ./ prefixes or extra quoting).","Never mix a commit ID with file paths in one invocation."],"tags":["cli","resolve","conflict","path-validation","gitbutler"],"backgroundTag":"invalid-path-argument","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}