From e758e5ca5323c823d3f647a40c136b9e30b013ae Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 27 Oct 2024 16:48:05 +0000 Subject: [PATCH] docs: Add page to website for jujutsu --- website/docs/usage/jujutsu.md | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 website/docs/usage/jujutsu.md diff --git a/website/docs/usage/jujutsu.md b/website/docs/usage/jujutsu.md new file mode 100644 index 0000000000..1e965a7c12 --- /dev/null +++ b/website/docs/usage/jujutsu.md @@ -0,0 +1,39 @@ +--- +sidebar_position: 12 +--- + +# Jujutsu + +You can use with a repository that has been cloned using [jujutsu](https://martinvonz.github.io/jj/latest/). + +## Colocated + +If the repository was cloned by `jujutsu` using the `--colocate` option, then all you need to do is make sure that +you have checked out your mainline branch using git. +If you don't, then you will likely see an error about an unborn branch. + +## Non-colocated + +If the repository was cloned by `jujutsu` but *not* using the `--colocate` option, +then the Git repository, normally the `.git` directory, is located in `.jj/repo/store/git` + +You can do one of two things to make your repository compatible with `git-cliff`: + +### Fake Colocation + +Create a file in the root of your repository that tells Git, and `git-cliff` where the Git repository is: + +```bash +echo "gitdir: .jj/repo/store/git" > .git +``` + +### Remote branches + +Update the `HEAD` of the Git repository to point to your remote mainline branch. + +```bash +echo "ref: refs/remotes/origin/main" > .jj/repo/store/git/HEAD +``` + +N.B. Replace `main` with the name of the remote branch you want to use. e.g. `master`, `trunk`, `mainline`, etc. +