jdx/mise · error
unresolved Git index entry
Error message
unresolved Git index entry {} in {} What it means
When reading the files managed by a Git-backed dotfiles source, mise runs `git ls-files --cached --stage` and validates each index record. A stage field ending in something other than `0` means the index holds an unmerged entry — i.e. an unresolved merge conflict — for that path. The library refuses to guess which side of the conflict is canonical, so it bails instead of capturing or syncing a half-resolved file.
Solutions
- Open the source repo, resolve the conflicted files, then `git add` them and commit or abort the merge (`git merge --abort` / `git rebase --abort`).
- Verify with `git ls-files -u` in the source directory — it should print nothing.
- Retry the mise dotfiles command once the index is clean.
Example fix
// before: conflicted index $ git ls-files -u 100644 <sha> 2 zshrc // after: resolve + stage $ $EDITOR zshrc && git add zshrc && git commit $ git ls-files -u (empty) — rerun `mise dot apply`
Defensive patterns
Strategy: validation
Validate before calling
if [ -n "$(git -C ~/dotfiles ls-files -u)" ]; then echo 'resolve merge conflicts in dotfiles repo first'; exit 1; fi
Prevention
- Resolve and commit (or abort) any merge/rebase in the dotfiles repo before running mise dot commands.
- Keep `git status` clean in the source repo as part of your workflow.
- Check `git ls-files -u` output is empty in CI before applying dotfiles.
When it happens
Trigger: Running `mise dot` operations (apply/capture/track) on a source directory whose Git repository has an in-progress merge or cherry-pick with conflicted, still-unresolved paths — `git ls-files --stage` reports stage 1/2/3 entries for those files.
Common situations: The dotfiles repo was pulled and had conflicts the user never resolved; a rebase/cherry-pick was aborted half-way (`git status` still shows unmerged paths); a tool edited the index leaving stale conflict entries.
Understand the failure class
Background: "git command failed": what it means when a tool shells out to git and git exits non-zero — this error's family across 21 libraries.
Related errors
- cannot determine dotfile Git ancestry
- cannot merge dotfile Git history
- checkpoint has no protective checkpoint to undo from
- comparing checkpoints requires git
- dotfile enrollment metadata is too large
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/f6284fbe40175d10.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/files.rs:2204
}
output
.stdout
.split(|byte| *byte == 0)
.filter(|record| !record.is_empty())
.map(|record| {
let tab = record
.iter()
.position(|byte| *byte == b'\t')
.ok_or_else(|| {
eyre::eyre!(
"unexpected git ls-files output for {}",
source.display_user()
)
})?;
let metadata = &record[..tab];
let path = path_buf_from_git_bytes(&record[tab + 1..]);
if !metadata.ends_with(b" 0") {
bail!(
"unresolved Git index entry {} in {}",
path.display(),
source.display_user()
);
}
Ok(GitTrackedPath {
is_gitlink: metadata.starts_with(b"160000 "),
is_symlink: metadata.starts_with(b"120000 "),
path,
})
})
.collect()
}
/// Capture only the files selected by a Git manifest, preserving the source
/// repository and any untracked files around them.
pub(crate) fn capture_git_manifest(req: &FileRequest) -> Result<()> {
for entry in git_tracked_paths(&req.source)? {View on GitHub (pinned to 533346cc37)