-
-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add page to website for jujutsu
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
|