jj-git-import
import Git refs from the backing repository into Jujutsu
TLDR
SYNOPSIS
jj git import [options]
DESCRIPTION
jj git import updates the Jujutsu repository with changes made in the underlying Git repository.It copies Git refs, compares them with the last imported state, and merges differences into local bookmarks and tags. The reverse direction is jj git export.Commits that are no longer reachable from any branch in the Git repo are treated as abandoned there, and Jujutsu abandons them locally to match. If the working-copy commit is among them, it is replaced with a new empty commit (the same rule as jj abandon in general).In a colocated workspace, every jj command already imports Git refs, so jj git import does nothing unless you pass --ignore-working-copy. In a non-colocated workspace (for example after jj git init --git-repo or jj git colocation disable), Git can change the backing store without Jujutsu noticing until you import.
PARAMETERS
--ignore-working-copy
Do not snapshot or update the working copy. In a colocated workspace, jj git import is otherwise a no-op because import already runs automatically; this flag forces an import.-h, --help
Display help information.
CONFIGURATION
git.abandon-unreachable-commits
When false, commits that disappeared from Git refs are not abandoned in the Jujutsu repo. Default is true.
INSTALL
CAVEATS
Subcommand of jj. Requires the Git backend. Import does not fetch from a remote; use jj git fetch for that. Mixing mutating git and jj commands in a colocated workspace can produce bookmark conflicts or divergent change IDs. Git's index, unfinished rebases, and other in-progress Git states are ignored.
SEE ALSO
jj-git-export(1), jj-git-fetch(1), jj-git-colocation(1), jj-git(1), jj(1)
