Skip to content

Commit

Permalink
docs: document script to colocate a jj-only repo
Browse files Browse the repository at this point in the history
martinvonz#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.
  • Loading branch information
glencbz committed Sep 14, 2023
1 parent 63b02ab commit 2c74fa8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/git-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2c74fa8

Please sign in to comment.