ok/jj
1
0
Fork 0
forked from mirrors/jj

docs: document script to colocate a jj-only repo

https://github.com/martinvonz/jj/discussions/2230 indicates a lot of
interest in this, so we'd probably want to support this officially at
some point. Until then, document a script that has worked well-enough
for some of us.
This commit is contained in:
Glen 2023-09-11 17:14:16 -07:00 committed by glencbz
parent 63b02ab05f
commit 2c74fa8c7c

View file

@ -153,6 +153,26 @@ repos may require you to deal with more involved Jujutsu and Git concepts.
report any new ones you find, or if any of the known bugs are less minor than
they appear.
### Converting a repo into a co-located repo
A Jujutsu repo backed by a Git repo has a full Git repo inside, so it is
technically possible (though not officially supported) to convert it into a
co-located repo like so:
```bash
# Move the Git repo
mv .jj/repo/store/git .git
# Tell jj where to find it
echo -n '../../../.git' > .jj/repo/store/git_target
# Ignore the .jj directory in Git
echo /.jj/ > .git/info/exclude
# Make the Git repository non-bare and set HEAD
git config --unset core.bare
jj st
```
We may officially support this in the future. If you try this, we would
appreciate feedback and bug reports.
## Branches