# We are in the octocat/Hello-World repo. # The "operation log" shows the operations # so far: $ jj op log @  7ec5c43d77e6 jjfan@jujube now, lasted 2 milliseconds │  track remote bookmark test@origin │  args: jj bookmark track test@origin ○  bcb99cfdeaf6 jjfan@jujube now, lasted 1 millisecond │  abandon commit b1b3f9723831141a31a1a7252a213e216ea76e56 │  args: jj abandon --ignore-immutable octocat-patch-1@origin ○  cbd79734a463 jjfan@jujube now, lasted 2 milliseconds │  check out git remote's branch: master │  args: jj git clone https://github.com/octocat/Hello-World ○  3fc0a75cf213 jjfan@jujube now, lasted 501 milliseconds │  fetch from git remote into empty repo │  args: jj git clone https://github.com/octocat/Hello-World ○  d4346f1d7d11 jjfan@jujube now, lasted 1 millisecond │  add git remote origin │  args: jj git clone https://github.com/octocat/Hello-World ○  385e3588a326 jjfan@jujube now, lasted 3 milliseconds │  add workspace 'default' ○  000000000000 root() # We are going to make some changes to show # how the operation log works. Let's add a file, set # a description, and rebase onto the "test" bookmark: $ echo stuff > new-file $ jj describe -m stuff Working copy  (@) now at: mkywokqk bc757fe5 stuff Parent commit (@-)      : orrkosyo 7fd1a60b master | (empty) Merge pull request ↓ #6 from Spaceghost/patch-1 $ jj rebase --onto test Rebased 1 commits to destination Working copy  (@) now at: mkywokqk 6be3d3bd stuff Parent commit (@-)      : kowxouwz b3cbd5bb test | Create CONTRIBUTING.md Added 1 files, modified 0 files, removed 0 files # We are now going to make another change off of # master: $ jj new master Working copy  (@) now at: lmxvvuro e23df82b (empty) (no description set) Parent commit (@-)      : orrkosyo 7fd1a60b master | (empty) Merge pull request ↓ #6 from Spaceghost/patch-1 Added 0 files, modified 0 files, removed 2 files $ jj describe -m "other stuff" Working copy  (@) now at: lmxvvuro 8fbe3619 (empty) other stuff Parent commit (@-)      : orrkosyo 7fd1a60b master | (empty) Merge pull request ↓ #6 from Spaceghost/patch-1 # The repo now looks like this: $ jj log @  lmxvvuro jjfan@example.com 2025-12-20 10:52:43 8fbe3619 │  (empty) other stuff │ ○  mkywokqk jjfan@example.com 2025-12-20 10:52:43 6be3d3bd │ │  stuff │ ○  kowxouwz octocat@nowhere.com 2014-06-10 16:22:26 test b3cbd5bb ├─╯  Create CONTRIBUTING.md ◆  orrkosyo octocat@nowhere.com 2012-03-06 17:06:50 master 7fd1a60b │  (empty) Merge pull request #6 from Spaceghost/patch-1 ~ # The most recent portion of the operation log # is: $ jj op log --limit 4 @  6fe860505124 jjfan@jujube now, lasted 2 milliseconds │  describe commit e23df82b798f95dce25d6afe927ef96740fcaccc │  args: jj describe -m 'other stuff' ○  e5fb5129190e jjfan@jujube now, lasted 3 milliseconds │  new empty commit │  args: jj new master ○  4fad9005482f jjfan@jujube now, lasted 3 milliseconds │  rebase commit bc757fe50896175ba63cc04c0652705700e62f07 and descendants │  args: jj rebase --onto test ○  ed5688dfcb09 jjfan@jujube now, lasted 2 milliseconds │  describe commit f55bbc6b6c0611320513479726a0a25da00b78a5 │  args: jj describe -m stuff # Let's revert that rebase operation: $ jj op revert 4fad9 Reverted operation: 4fad9005482f (2025-12-20 10:52:43) rebase commit bc757fe5089↓ 6175ba63cc04c0652705700e62f07 and descendants # Note that only the rebase was reverted, and the # subsequent "other stuff" change was not reverted: $ jj log @  lmxvvuro jjfan@example.com 2025-12-20 10:52:43 8fbe3619 │  (empty) other stuff │ ○  mkywokqk jjfan@example.com 2025-12-20 10:52:43 bc757fe5 ├─╯  stuff │ ○  kowxouwz octocat@nowhere.com 2014-06-10 16:22:26 test b3cbd5bb ├─╯  Create CONTRIBUTING.md ◆  orrkosyo octocat@nowhere.com 2012-03-06 17:06:50 master 7fd1a60b │  (empty) Merge pull request #6 from Spaceghost/patch-1 ~ # We can also see what the repo looked like # after the rebase operation: $ jj --at-op 4fad9 log @  mkywokqk jjfan@example.com 2025-12-20 10:52:43 6be3d3bd │  stuff ○  kowxouwz octocat@nowhere.com 2014-06-10 16:22:26 test b3cbd5bb │  Create CONTRIBUTING.md ◆  orrkosyo octocat@nowhere.com 2012-03-06 17:06:50 master 7fd1a60b │  (empty) Merge pull request #6 from Spaceghost/patch-1 ~ # Let's say we instead want to go back to the # state of the repo right after the rebase: $ jj op restore 4fad9 Restored to operation: 4fad9005482f (2025-12-20 10:52:43) rebase commit bc757fe5↓ 0896175ba63cc04c0652705700e62f07 and descendants Working copy  (@) now at: mkywokqk 6be3d3bd stuff Parent commit (@-)      : kowxouwz b3cbd5bb test | Create CONTRIBUTING.md Added 2 files, modified 0 files, removed 0 files # We're now back to before the "other stuff" # change existed: $ jj log @  mkywokqk jjfan@example.com 2025-12-20 10:52:43 6be3d3bd │  stuff ○  kowxouwz octocat@nowhere.com 2014-06-10 16:22:26 test b3cbd5bb │  Create CONTRIBUTING.md ◆  orrkosyo octocat@nowhere.com 2012-03-06 17:06:50 master 7fd1a60b │  (empty) Merge pull request #6 from Spaceghost/patch-1 ~