forked from martinvonz/jj
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
1,485 additions
and
217 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,15 @@ | ||
#!/bin/sh | ||
# Set up a virtual environment with the required tools, build, and deploy the docs. | ||
# | ||
# Run from the root directory of the project as | ||
# .github/scripts/docs-build-deploy 'https://martinvonz.github.io' prerelease main | ||
# All arguments after the first are passed to `mike deploy`, run | ||
# `poetry run -- mike deploy --help` for options. Note that `mike deploy` | ||
# creates a commit directly on the `gh-pages` branch. | ||
set -ev | ||
|
||
export "SITE_URL_FOR_MKDOCS=$1"; shift | ||
# https://github.com/python-poetry/poetry/issues/1917 | ||
export PYTHON_KEYRING_BACKEND=keyring.backends.fail.Keyring | ||
poetry install # Only really needed once per environment unless there are updates | ||
poetry run -- mike deploy "$@" |
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
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,34 @@ | ||
name: website | ||
|
||
on: | ||
push: | ||
branches: | ||
- ilya-docs | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
prerelease-docs-build-deploy: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: "git fetch origin gh-pages --depth=1" | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Install poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: latest | ||
- name: Install dependencies, compile and deploy docs | ||
run: | | ||
git config user.name jj-docs-bot | ||
git config user.email [email protected] | ||
.github/scripts/docs-build-deploy 'https://ilyagr.github.io/jj' prerelease main --push | ||
- name: "Show `git diff --stat`" | ||
run: git diff --stat gh-pages^ gh-pages || echo "(No diffs)" |
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 |
---|---|---|
|
@@ -70,3 +70,29 @@ jobs: | |
asset_path: ${{ env.ASSET }} | ||
asset_name: ${{ env.ASSET }} | ||
asset_content_type: application/octet-stream | ||
|
||
docs-build-deploy: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: "git fetch origin gh-pages --depth=1" | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Install poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: latest | ||
- name: Install dependencies, compile and deploy docs | ||
run: | | ||
git config user.name jj-docs-bot | ||
git config user.email [email protected] | ||
# Using the 'latest' tag below makes the website default | ||
# to this version. | ||
.github/scripts/docs-build-deploy 'https://ilyagr.github.io/jj' "${{ github.event.release.tag_name }}" latest --update-aliases --push | ||
- name: "Show `git diff --stat`" | ||
run: git diff --stat gh-pages^ gh-pages || echo "(No diffs)" |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/target/ | ||
/rendered-docs | ||
.direnv | ||
.envrc | ||
# generated by nix build, nix-build | ||
|
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 |
---|---|---|
|
@@ -6,10 +6,8 @@ | |
|
||
- [Disclaimer](#disclaimer) | ||
- [Introduction](#introduction) | ||
- [Status](#status) | ||
- [Installation](#installation) | ||
- [Command-line completion](#command-line-completion) | ||
- [Getting started](#getting-started) | ||
- [Status](#status) | ||
- [Related work](#related-work) | ||
|
||
## Disclaimer | ||
|
@@ -44,6 +42,19 @@ If you have any questions, please join us on Discord | |
or start a [GitHub Discussion](https://github.com/martinvonz/jj/discussions). | ||
The [glossary](docs/glossary.md) may also be helpful. | ||
|
||
|
||
## Getting started | ||
|
||
Follow the [installation instructions](docs/install-and-setup.md) to obtain and configure `jj`. | ||
|
||
The best way to get started is probably to go through | ||
[the tutorial](docs/tutorial.md). Also see the | ||
[Git comparison](docs/git-comparison.md), which includes a table of | ||
`jj` vs. `git` commands. | ||
|
||
As you become more familiar with Jujutsu, the [FAQ](docs/FAQ.md) may help. | ||
|
||
|
||
## Features | ||
|
||
### Compatible with Git | ||
|
@@ -145,177 +156,6 @@ away from `jj`). For any format changes, we'll try to implement transparent | |
upgrades (as we've done with recent changes), or provide upgrade commands or | ||
scripts if requested. | ||
|
||
## Installation | ||
|
||
See below for how to build from source. There are also | ||
[pre-built binaries](https://github.com/martinvonz/jj/releases) for Windows, | ||
Mac, or Linux (musl). | ||
|
||
### Linux | ||
|
||
On most distributions, you'll need to build from source using `cargo` directly. | ||
|
||
#### Build using `cargo` | ||
|
||
First make sure that you have the `libssl-dev`, `openssl`, and `pkg-config` | ||
packages installed by running something like this: | ||
|
||
```shell script | ||
sudo apt-get install libssl-dev openssl pkg-config | ||
``` | ||
|
||
Now run: | ||
|
||
```shell script | ||
cargo install --git https://github.com/martinvonz/jj.git --locked --bin jj jj-cli | ||
``` | ||
|
||
#### Nix OS | ||
|
||
If you're on Nix OS you can use the flake for this repository. | ||
For example, if you want to run `jj` loaded from the flake, use: | ||
|
||
```shell script | ||
nix run 'github:martinvonz/jj' | ||
``` | ||
|
||
You can also add this flake url to your system input flakes. Or you can | ||
install the flake to your user profile: | ||
|
||
```shell script | ||
nix profile install 'github:martinvonz/jj' | ||
``` | ||
|
||
#### Homebrew | ||
|
||
If you use linuxbrew, you can run: | ||
|
||
```shell script | ||
brew install jj | ||
``` | ||
|
||
### Mac | ||
|
||
#### Homebrew | ||
|
||
If you use Homebrew, you can run: | ||
|
||
```shell script | ||
brew install jj | ||
``` | ||
|
||
#### MacPorts | ||
|
||
You can also install `jj` via [MacPorts](https://www.macports.org) (as | ||
the `jujutsu` port): | ||
|
||
```shell script | ||
sudo port install jujutsu | ||
``` | ||
|
||
([port page](https://ports.macports.org/port/jujutsu/)) | ||
|
||
#### From Source | ||
|
||
You may need to run some or all of these: | ||
|
||
```shell script | ||
xcode-select --install | ||
brew install openssl | ||
brew install pkg-config | ||
export PKG_CONFIG_PATH="$(brew --prefix)/opt/openssl@3/lib/pkgconfig" | ||
``` | ||
|
||
Now run: | ||
|
||
```shell script | ||
cargo install --git https://github.com/martinvonz/jj.git --locked --bin jj jj-cli | ||
``` | ||
|
||
### Windows | ||
|
||
Run: | ||
|
||
```shell script | ||
cargo install --git https://github.com/martinvonz/jj.git --locked --bin jj jj-cli --features vendored-openssl | ||
``` | ||
|
||
## Initial configuration | ||
|
||
You may want to configure your name and email so commits are made in your name. | ||
|
||
```shell script | ||
$ jj config set --user user.name "Martin von Zweigbergk" | ||
$ jj config set --user user.email "[email protected]" | ||
``` | ||
|
||
## Command-line completion | ||
|
||
To set up command-line completion, source the output of | ||
`jj util completion --bash/--zsh/--fish` (called `jj debug completion` in | ||
jj <= 0.7.0). Exactly how to source it depends on your shell. | ||
|
||
### Bash | ||
|
||
```shell script | ||
source <(jj util completion) # --bash is the default | ||
``` | ||
|
||
Or, with jj <= 0.7.0: | ||
|
||
```shell script | ||
source <(jj debug completion) # --bash is the default | ||
``` | ||
|
||
### Zsh | ||
|
||
```shell script | ||
autoload -U compinit | ||
compinit | ||
source <(jj util completion --zsh) | ||
``` | ||
|
||
Or, with jj <= 0.7.0: | ||
|
||
```shell script | ||
autoload -U compinit | ||
compinit | ||
source <(jj debug completion --zsh) | ||
``` | ||
|
||
### Fish | ||
|
||
```shell script | ||
jj util completion --fish | source | ||
``` | ||
|
||
Or, with jj <= 0.7.0: | ||
|
||
```shell script | ||
jj debug completion --fish | source | ||
``` | ||
|
||
### Xonsh | ||
|
||
```shell script | ||
source-bash $(jj util completion) | ||
``` | ||
|
||
Or, with jj <= 0.7.0: | ||
|
||
```shell script | ||
source-bash $(jj debug completion) | ||
``` | ||
|
||
## Getting started | ||
|
||
The best way to get started is probably to go through | ||
[the tutorial](docs/tutorial.md). Also see the | ||
[Git comparison](docs/git-comparison.md), which includes a table of | ||
`jj` vs. `git` commands. | ||
|
||
As you become more familiar with Jujutsu, the [FAQ](docs/FAQ.md) may help. | ||
|
||
## Related work | ||
|
||
There are several tools trying to solve similar problems as Jujutsu. See | ||
|
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
Oops, something went wrong.