Skip to content

Commit

Permalink
docs/FAQ.md: answer monitoring jj log with watch and TUIs
Browse files Browse the repository at this point in the history
* Suggested `watch --color` as recommended by @ilyagr
* Answered monitoring `jj log` with watch and TUIs
* Minor wording fix.
* Adjusted watch(1) and hwatch links as suggested by @ilyagr

Signed-off-by: Tim Janik <[email protected]>
  • Loading branch information
tim-janik authored and ilyagr committed Nov 7, 2024
1 parent aacddb2 commit aa04002
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,23 @@ See [revsets] and [templates] for further guidance.

Use `jj log -r ..`. The `..` [operator] lists all visible commits in the repo, excluding the root (which is never interesting and is shared by all repos).

### Can I monitor how `jj log` evolves?

The simplest way to monitor how the history as shown by `jj log` evolves is by using the [watch(1)](https://man7.org/linux/man-pages/man1/watch.1.html) command (or [hwatch](https://github.com/blacknon/hwatch?tab=readme-ov-file#configuration) or [viddy](https://github.com/sachaos/viddy)).
For example:

```sh
watch --color jj --ignore-working-copy log --color=always
```

This will continuously update the (colored) log output in the terminal.
The `--ignore-working-copy` option avoids conflicts with manual operations during the creation of snapshots.
Martin used watch in a [tmux](https://github.com/tmux/tmux/wiki) pane during his presentation [Jujutsu - A Git-compatible VCS](https://www.youtube.com/watch?v=LV0JzI8IcCY).

Alternatively, you can use [jj-fzf](https://github.com/tim-janik/jj-fzf), where the central piece is the `jj log` view and common operations can be carried out via key bindings while the log view updates.

The wiki lists additional TUIs and GUIs beyond the terminal: [GUI-and-TUI](https://github.com/martinvonz/jj/wiki/GUI-and-TUI)

### Should I co-locate my repository?

Co-locating a Jujutsu repository allows you to use both Jujutsu and Git in the
Expand Down

0 comments on commit aa04002

Please sign in to comment.