docs: Simplify instructions for using private commits
Some checks are pending
binaries / Build binary artifacts (linux-aarch64-gnu, ubuntu-24.04, aarch64-unknown-linux-gnu) (push) Waiting to run
binaries / Build binary artifacts (linux-aarch64-musl, ubuntu-24.04, aarch64-unknown-linux-musl) (push) Waiting to run
binaries / Build binary artifacts (linux-x86_64-gnu, ubuntu-24.04, x86_64-unknown-linux-gnu) (push) Waiting to run
binaries / Build binary artifacts (linux-x86_64-musl, ubuntu-24.04, x86_64-unknown-linux-musl) (push) Waiting to run
binaries / Build binary artifacts (macos-aarch64, macos-14, aarch64-apple-darwin) (push) Waiting to run
binaries / Build binary artifacts (macos-x86_64, macos-13, x86_64-apple-darwin) (push) Waiting to run
binaries / Build binary artifacts (win-x86_64, windows-2022, x86_64-pc-windows-msvc) (push) Waiting to run
nix / flake check (macos-14) (push) Waiting to run
nix / flake check (ubuntu-latest) (push) Waiting to run
build / build (, macos-13) (push) Waiting to run
build / build (, macos-14) (push) Waiting to run
build / build (, ubuntu-latest) (push) Waiting to run
build / build (, windows-latest) (push) Waiting to run
build / build (--all-features, ubuntu-latest) (push) Waiting to run
build / Build jj-lib without Git support (push) Waiting to run
build / Check protos (push) Waiting to run
build / Check formatting (push) Waiting to run
build / Check that MkDocs can build the docs (push) Waiting to run
build / Check that MkDocs can build the docs with Poetry 1.8 (push) Waiting to run
build / cargo-deny (advisories) (push) Waiting to run
build / cargo-deny (bans licenses sources) (push) Waiting to run
build / Clippy check (push) Waiting to run
Codespell / Codespell (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-latest) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run

The current instructions ask the reader to convert the merge commit into
a single-parent commit, then create a new merge.

It is probably simpler to follow instructions for inserting a new commit
before the merge commit.
This commit is contained in:
Stephen Jennings 2024-10-25 16:17:23 -07:00
parent 891fa88be0
commit 95283dd04f

View file

@ -219,16 +219,21 @@ Now you're ready to work:
- The private commit _wwwwwwww_ is the second parent of the merge commit.
- The working copy (_vvvvvvvv_) contains changes from both.
As you work, squash your changes using `jj squash --into xxxxxxxx`. Or you can
keep your changes in a separate commit without the private commit _wwwwwwww_ as a
parent:
As you work, squash your changes using `jj squash --into xxxxxxxx`.
If you need a new empty commit on top of `xxxxxxxx` you can use the
`--insert-after` and `--insert-before` options (`-A` and `-B` for short):
```shell
# Remove the private commit as a parent
$ jj rebase -r vvvvvvvv -d xxxxxxxx
# Insert a new commit after xxxxxxxx
$ jj new --no-edit -A xxxxxxxx -m "Another feature"
Working copy now at: uuuuuuuu 1c3cff09 (empty) Another feature
Parent commit : xxxxxxxx ef612875 Add new feature
# Create a new merge commit to work in
$ jj new vvvvvvvv wwwwwwww
# Insert a new commit between yyyyyyyy and vvvvvvvv
$ jj new --no-edit -A yyyyyyyy -B vvvvvvvv -m "Yet another feature"
Working copy now at: tttttttt 938ab831 (empty) Yet another feature
Parent commit : yyyyyyyy b624cf12 Existing work
```
To avoid pushing change _wwwwwwww_ by mistake, use the configuration