gitbutlerapp/gitbutler · error
No conflicted commits found.
Error message
No conflicted commits found.
What it means
Thrown by apply_resolutions when target_conflicted_commit returns None, meaning there are no conflicted commits anywhere in the workspace (and none matching the given target). There is nothing to apply resolutions to.
Solutions
- Verify conflicts exist with `but status` / `but resolve` (list mode).
- If already resolved, run `but resolve finish` instead.
- Skip the command — nothing needs resolving.
Defensive patterns
Strategy: validation
Validate before calling
const conflicts = listConflicts();
if (conflicts.length === 0) { console.log('Nothing to resolve'); return; } Try / catch
try { await butResolve(...) } catch (e) { if (String(e).includes('No conflicted commits found')) { /* clean exit — nothing pending */ } } Prevention
- Check for conflicts before invoking resolve.
- Treat this as an expected no-op in scripts.
- Re-check state after `but resolve finish`.
When it happens
Trigger: `but resolve` when the repository has no pending conflicts, or `but resolve <target>` where the target has no conflicts so target_conflicted_commit finds nothing.
Common situations: Re-running a resolve command after conflicts were already resolved and finished; or invoking resolve in a clean workspace by mistake.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- Branch " " has no conflicted commits.
- Commit is not conflicted.
- " " cannot be resolved this way: Resolve this commit in…
- There are changes that differ from the original commit you…
- You are in conflict resolution mode. Finish with `but…
AI-assisted analysis of gitbutlerapp/gitbutler@58e5313667 (2026-09-18).
Data as JSON: /api/errors/6c76c1780b4454a6.
Report an issue: GitHub.
Appendix: source
Thrown at crates/but/src/command/legacy/resolve.rs:887
) -> Result<()> {
use but_api::resolve::{HunkResolution, ResolutionSpec};
let ResolutionFlags {
ours,
theirs,
ai,
file,
} = flags;
let t = theme::get();
let mode = operating_mode(ctx)?.operating_mode;
if matches!(mode, OperatingMode::Edit(_)) {
bail!(
"You are in conflict resolution mode. Finish with `but resolve finish` or cancel with `but resolve cancel` first."
);
}
let Some(conflict_target) = target_conflicted_commit(ctx, commit)? else {
bail!("No conflicted commits found.");
};
let commit_oid = conflict_target.commit_oid;
// Split a trailing `:<number>` off the target; everything else is the path.
let (path, hunk) = match target.rsplit_once(':') {
Some((path, number))
if !number.is_empty() && number.bytes().all(|b| b.is_ascii_digit()) =>
{
(path, Some(number.parse::<usize>()?))
}
_ => (target, None),
};
let resolution = if ours {
HunkResolution::Ours
} else if theirs {
HunkResolution::Theirs
} else if ai {View on GitHub (pinned to 58e5313667)