cli: unblock "jj git init --colocate" in existing Git repo directory

I'm not sure what's the conclusion in #2747, but I don't think there is a
disagreement on allowing --colocate to import existing Git repo.
This commit is contained in:
Yuya Nishihara 2024-02-25 20:39:42 +09:00
parent 356037379a
commit 8d0414549b
9 changed files with 90 additions and 60 deletions

View file

@ -66,12 +66,11 @@ changes.
## Working in a Git co-located repository
After doing `jj init --git-repo=.`, Git will be in
a [detached HEAD state][detached], which is unusual, as Git mainly works with
branches. In a co-located repository, every `jj` command will automatically
synchronize Jujutsu's view of the repo with Git's view. For example,
`jj commit` updates the HEAD of the Git repository, enabling an incremental
migration.
After doing `jj git init --colocate`, Git will be in a [detached HEAD
state][detached], which is unusual, as Git mainly works with branches. In a
co-located repository, every `jj` command will automatically synchronize
Jujutsu's view of the repo with Git's view. For example, `jj commit` updates the
HEAD of the Git repository, enabling an incremental migration.
```shell
$ nvim docs/tutorial.md