GitoxideLabs/gitoxide · error
time-travel would conflict; retry with…
Error message
time-travel would conflict; retry with --materialize-conflicts to check it out
What it means
A time-travel destination would conflict with the current checkout, and --materialize-conflicts was not supplied, so tix aborts without touching the working tree rather than leaving silent conflict markers. The message tells the user to retry with the flag if they want the conflict checked out for inspection.
Solutions
- Retry with --materialize-conflicts to write the conflict and continue from there
- Clean or commit/stash working-tree changes so the destination applies cleanly
- Choose a different destination that does not conflict
Example fix
// before tix travel HEAD~5 // after tix travel HEAD~5 --materialize-conflicts
Defensive patterns
Strategy: retry
Validate before calling
// Only retry with materialization when a conflict is reported
if stderr.contains("time-travel would conflict") {
retry_with_flag("--materialize-conflicts");
} Try / catch
match travel(dest) {
Err(e) if e.to_string().contains("time-travel would conflict") => travel_with_materialization(dest)?,
other => other?,
} Prevention
- Pass --materialize-conflicts proactively in dirty trees
- Commit or stash local changes before travelling
- Verify the destination tree applies cleanly
When it happens
Trigger: `tix travel <dest>` where Perform returns Perform::Conflict and args.materialize_conflicts is false in run().
Common situations: Travelling back to a commit that conflicts with dirty working-tree state; forgetting the flag when the destination tree diverges; automation hitting conflicts unexpectedly.
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
- {notice}
- aborted without changes: conflict while applying ; pass…
- aborted without changes: refusing to materialize a conflict…
- stopped at a materialized conflict
- exactly one time-travel destination is required
AI-assisted analysis of GitoxideLabs/gitoxide@e73179060b (2026-09-08).
Data as JSON: /api/errors/25aa14fa57a39335.
Report an issue: GitHub.
Appendix: source
Thrown at gix-tix/src/command/travel.rs:127
super::notice_with_change_id(
&repository,
¬ice.unwrap_or_else(|| format!("already at {}", selected.to_hex_with_len(7))),
selected,
)?
);
super::print_ref_rewrites(&repository, &ref_rewrites)?;
super::record_undo(&repository, "time travel", Ok(ref_changes));
}
crate::edit::time_travel::Perform::Conflict(conflict) if args.materialize_conflicts => {
let (notice, _, ref_rewrites, ref_changes) = conflict.accept()?;
let repository = crate::open_repository(&repository_path, bare, false)
.context("could not reopen repository after materializing time-travel")?;
super::print_ref_rewrites(&repository, &ref_rewrites)?;
super::record_undo(&repository, "materialize time-travel conflict", Ok(ref_changes));
anyhow::bail!("{notice}");
}
crate::edit::time_travel::Perform::Conflict(_) => {
anyhow::bail!("time-travel would conflict; retry with --materialize-conflicts to check it out")
}
}
Ok(())
}
fn relative_destination(
repository: &gix::Repository,
graph: &crate::history::HistoryGraph,
hidden_tips: &[gix::ObjectId],
head: gix::ObjectId,
to: To,
) -> Result<gix::ObjectId> {
let order = graph
.stored_commit_ids()
.filter(|id| !hidden_tips.iter().any(|hidden| graph.is_ancestor(*id, *hidden)))
.collect::<Vec<_>>();
let stored = order.iter().copied().collect::<HashSet<_>>();
if !stored.contains(&head) {View on GitHub (pinned to e73179060b)