Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
document the jj equivalent of git reset --soft
i did the following things: 1. make some changes to the working copy 2. run `jj commit` 3. before i added a description, i decided i didn't want to commit yet. in git, the way to do this is to delete the contents of the editor; git sees that it is blank and aborts the commit. in jj, this doesn't work, because descriptions are allowed to be empty. now i have the following jj state: ``` ; jj log --stat @ pokrsyvs [email protected] 2024-02-06 21:48:17.000 -05:00 ddd6217f │ (empty) (no description set) │ 0 files changed, 0 insertions(+), 0 deletions(-) ◉ lqqmzmku [email protected] 2024-02-06 21:48:02.000 -05:00 HEAD@git b03bf3de │ (no description set) │ config/jj.toml | 2 +- │ 1 file changed, 1 insertion(+), 1 deletion(-) ◉ xqkmwvwp [email protected] 2024-02-06 21:47:08.000 -05:00 master b673f97b ``` i want to undo the most recent commit, `lqqmzmku`. i'm used to doing this with `git reset --soft HEAD~`, which makes the parent `xqkmwvwp` and leaves the change to `config/jj.toml` on disk while removing it from the git history; basically `lqqmzmku` would go back to being the working copy. i found that `jj move` does what i want, but it took a lot of trawling the options, it wasn't obvious, and i couldn't find `git reset` mentioned in the docs.
- Loading branch information