mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-27 06:27:43 +00:00
docs: describe how to configure scm-diff-editor
This commit is contained in:
parent
86b6a11e63
commit
d858964067
2 changed files with 21 additions and 6 deletions
|
@ -327,6 +327,24 @@ merge-tools.kdiff3.edit-args = [
|
|||
"--merge", "--cs", "CreateBakFiles=0", "$left", "$right"]
|
||||
```
|
||||
|
||||
### Setting up `scm-diff-editor`
|
||||
|
||||
`scm-diff-editor` is a terminal-based diff editor that is part of
|
||||
the [git-branchless](https://github.com/arxanas/git-branchless) suite of tools.
|
||||
It's a good alternative to Meld, especially if you don't have a graphical
|
||||
environment (e.g. when using SSH). To install it:
|
||||
|
||||
```shell
|
||||
cargo install --git https://github.com/arxanas/git-branchless scm-record
|
||||
--features scm-diff-editor
|
||||
```
|
||||
|
||||
Then config it as follows:
|
||||
|
||||
```toml
|
||||
ui.diff-editor = ["scm-diff-editor", "--dir-diff", "$left", "$right"]
|
||||
```
|
||||
|
||||
### `JJ-INSTRUCTIONS`
|
||||
|
||||
When editing a diff, jj will include a synthetic file called `JJ-INSTRUCTIONS`
|
||||
|
|
|
@ -331,12 +331,9 @@ try `jj log --at-op=367400773f87` but use the hash from your own `jj op log`.
|
|||
|
||||
You have already seen how `jj squash` can combine the changes from two commits
|
||||
into one. There are several other commands for changing the contents of existing
|
||||
commits. These commands assume that you have `meld` installed. If you prefer
|
||||
`vimdiff`, add this to your `~/.jjconfig.toml` file:
|
||||
```
|
||||
[ui]
|
||||
diff-editor = "vimdiff"
|
||||
```
|
||||
commits. These commands assume that you have `meld` installed. If you prefer a
|
||||
terminal-based diff editor, you
|
||||
can [configure `scm-diff-editor`](config.md#setting-up-scm-diff-editor) instead.
|
||||
|
||||
We'll need some more complex content to test these commands, so let's create a
|
||||
few more commits:
|
||||
|
|
Loading…
Reference in a new issue