ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/docs
jyn bca905a26e 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 github@jyn.dev 2024-02-06 21:48:17.000 -05:00 ddd6217f
│  (empty) (no description set)
│  0 files changed, 0 insertions(+), 0 deletions(-)
◉  lqqmzmku github@jyn.dev 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 github@jyn.dev 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.
2024-02-10 08:49:03 -08:00
..
design sparse-v2: design doc proposition for Sparse Patterns refactoring 2024-02-01 16:02:14 -08:00
technical docs: update description of conflicts to be about tree-level conflicts 2023-11-30 14:24:48 -08:00
branches.md docs branches.md: insert definitions for related terms 2024-01-24 18:47:17 -08:00
cli-reference.md docs: store output of jj util markdown-help, render it on the website 2024-01-30 14:58:32 -08:00
code-of-conduct.md Replace contact method with addresses of active leads. 2023-11-28 13:48:22 -05:00
config.md docs: fix some automerge fallout 2024-02-09 12:36:28 -06:00
config.toml docs: document git.fetch and git.push config options 2024-02-09 12:03:42 -06:00
conflicts.md
contributing.md rust: bump MSRV to 1.76.0 2024-02-09 15:48:01 -06:00
FAQ.md docs: Add FAQ item for git log 2024-02-06 15:03:51 -07:00
git-comparison.md document the jj equivalent of git reset --soft 2024-02-10 08:49:03 -08:00
git-compatibility.md gc: implement basic GC for Git backend 2023-12-03 07:40:12 -08:00
github.md git: turn git.auto-local-branch off by default 2023-12-17 08:30:24 +09:00
glossary.md docs branches.md: insert definitions for related terms 2024-01-24 18:47:17 -08:00
index.md
install-and-setup.md install-and-setup.md: --strategy -> --strategies for cargo binstall 2023-11-21 20:19:38 -08:00
operation-log.md op_walk: add support for op_id+ (children) operator 2024-01-02 10:30:08 +09:00
related-work.md
revsets.md docs: emphasize and clarify log revsets relevant to people coming from git 2024-01-31 15:51:40 -08:00
sapling-comparison.md mkdocs: make MkDocs work with more GitHub-like list formatting 2023-11-03 19:15:37 -07:00
templates.md templater: parse negative integer as unary operator and literal 2024-02-10 09:15:21 +09:00
tutorial.md cli: deprecate jj checkout 2024-02-03 17:21:56 -06:00
windows.md docs: add notes for Windows users 2024-01-29 12:16:15 -08:00
working-copy.md