Skip to content

jj-{commit, describe, edit, new, squash}: add pages #17047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions pages/common/jj-commit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# jj commit

> Update the description and create a new change on top.
> More information: <https://jj-vcs.github.io/jj/latest/cli-reference/#jj-commit>.

- Open editor to write the commit message and then create a new empty commit on top:

`jj commit`

- Commit with the given message:

`jj commit {{[-m|--message]}} "{{message}}"`

- Interactively choose which changes to include:

`jj commit {{[-i|--interactive]}}`
16 changes: 16 additions & 0 deletions pages/common/jj-describe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# jj describe

> Update the change description or other metadata.
> More information: <https://jj-vcs.github.io/jj/latest/cli-reference/#jj-describe>.

- Update the description of the current change:

`jj {{[desc|describe]}}`

- Update the description of given revsets:

`jj {{[desc|describe]}} {{revsets}}`

- Update the description to the given message:

`jj {{[desc|describe]}} {{[-m|--message]}} {{message}}`
9 changes: 9 additions & 0 deletions pages/common/jj-edit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# jj edit

> Set the specified revision as the working-copy revision.
> Note: It is generally recommended to instead use `jj new` and `jj squash`.
> More information: <https://jj-vcs.github.io/jj/latest/cli-reference/#jj-edit>.
- Set the given revision as the working copy:

`jj edit {{revset}}`
20 changes: 20 additions & 0 deletions pages/common/jj-new.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# jj new

> Create a new empty change.
> More information: <https://jj-vcs.github.io/jj/latest/cli-reference/#jj-new>.

- Create a new empty change on top of current revision:

`jj new`

- Create a new empty change on top of specific revision:

`jj new {{revision}}`

- Create a new merge change on top of multiple revisions:

`jj new {{revset1 revset2 ...}}`

- Create a new empty change before and after specified revisions:

`jj new {{[-B|--insert-before]}} {{revsets}} {{[-A|--insert-after]}} {{revsets}}`
20 changes: 20 additions & 0 deletions pages/common/jj-squash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# jj squash

> Move changes from a revision into another revision.
> More information: <https://jj-vcs.github.io/jj/latest/cli-reference/#jj-squash>.

- Move all changes from current revision to its parent:

`jj squash`

- Move all changes from given revision to its parent:

`jj squash {{[-r|--revision]}} {{revset}}`

- Move all changes from given revision(s) to given other revision:

`jj squash {{[-f|--from]}} {{revsets}} {{[-t|--into]}} {{revset}}`

- Interactively choose which parts to squash:

`jj squash {{[-i|--interactive]}}`