jj-restore

restores file contents from another revision

TLDR

Restore files from parent
$ jj restore
Restore specific files
$ jj restore [file1] [file2]
Restore from specific revision
$ jj restore --from [revision]
Restore to specific revision
$ jj restore --to [revision] --from [source]
Restore files matching a revset
$ jj restore -c [revision] [path]
Restore and keep changes as a new commit
$ jj restore --changes-in [revision]

SYNOPSIS

jj restore [options] [paths...]

DESCRIPTION

jj restore restores file contents from another revision. By default, restores from the parent revision, effectively discarding changes. Can restore specific files or entire working copy.

PARAMETERS

--from revision

Source revision for content.
--to revision
Target revision to modify.

INSTALL

sudo pacman -S jujutsu
sudo apk add jujutsu
sudo zypper install jujutsu
brew install jujutsu
nix profile install nixpkgs#jujutsu

SEE ALSO

jj(1), jj-revert(1)