nikivdev/code · error
--ignored requires the target to be inside a git repository
Error message
--ignored requires the target to be inside a git repository
What it means
Error "--ignored requires the target to be inside a git repository" thrown in nikivdev/code.
Source
Thrown at src/code.rs:566
ensure_dir(parent, opts.dry_run, &mut planned_dirs)?;
}
}
if opts.dry_run {
println!(
"Would copy template {} -> {}",
template_dir.display(),
target_display
);
if opts.ignored {
if let Some((repo_root, entry)) = gitignore_entry_for_target(&target)? {
println!(
"Would add {} to {}",
entry,
repo_root.join(".gitignore").display()
);
} else {
bail!("--ignored requires the target to be inside a git repository");
}
}
return Ok(());
}
copy_dir_all(&template_dir, &target)?;
println!("Created {}", target_display);
if opts.ignored {
if let Some((repo_root, entry)) = gitignore_entry_for_target(&target)? {
ensure_gitignore_entry(&repo_root, &entry)?;
} else {
bail!("--ignored requires the target to be inside a git repository");
}
}
Ok(())
}
fn migrate_project(opts: CodeMigrateOpts, root: &str) -> Result<()> {View on GitHub (pinned to a747e741ae)
When it happens
Trigger: Thrown at src/code.rs:566 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/061ba09298077623.
Report an issue: GitHub.