LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

jj-squash

moves changes from a revision into its parent or a specified destination in Jujutsu

TLDR

Squash working copy into its parent
$ jj squash
copy
Squash a specific revision into its parent
$ jj squash -r [revision]
copy
Interactively select which parts to squash
$ jj squash -i
copy
Squash into a specific destination revision
$ jj squash --into [destination]
copy
Squash from one revision into another
$ jj squash --from [source] --into [destination]
copy
Squash with a custom description message
$ jj squash -m "[message]"
copy
Squash only specific file paths
$ jj squash [path/to/file]
copy

SYNOPSIS

jj squash [options] [FILESETS]

DESCRIPTION

jj squash moves changes from a revision into its parent or a specified destination in Jujutsu. Without options, it moves all changes from the working-copy commit (@) into its parent. The source commit becomes empty and is abandoned by default. Use --from and --into to move changes between arbitrary revisions. You can restrict the operation to specific file paths by passing filesets as arguments.

PARAMETERS

-r, --revision REVSET

Revision to squash into its parent (default: @).
-f, --from REVSETS
Revision(s) to squash from (default: @).
-t, --into REVSET
Revision to squash into (default: parent of source).
-i, --interactive
Interactively choose which parts to squash.
--tool NAME
Specify diff editor to use (implies --interactive).
-m, --message MESSAGE
Description for the squashed revision (don't open editor).
-u, --use-destination-message
Use the description of the destination revision and discard the source description(s).
-k, --keep-emptied
Do not abandon the source revision even if it becomes empty.

SEE ALSO

Copied to clipboard
Kai