Skip to content

"I forgot to jj new and this went to the wrong change" #4998

Closed Answered by tim-janik
gasche asked this question in Q&A
Discussion options

You must be logged in to vote

I don't currently know of a convenient way to fix this issue after the fact, unless the changes are separate enough that jj split can do it.

This is partly an FAQ:

I run into that myself quite often, which is why I've added a simple way to jj-fzf to achieve this:

  • Start jj-fzf in your repo: https://github.com/tim-janik/jj-fzf/
  • Hit Ctrl-O for the op-log
  • Select the operation that still contains the old (yesterday's) changes
  • Hit Alt-W: Restore working copy of the selected operation into a new commit before @

This uses jj new -b @ && jj restore…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by gasche
Comment options

gasche
Nov 29, 2024
Collaborator Author

You must be logged in to vote
5 replies
@joyously
Comment options

@arxanas
Comment options

arxanas Nov 29, 2024
Collaborator

@gasche
Comment options

gasche Nov 29, 2024
Collaborator Author

@arxanas
Comment options

arxanas Nov 29, 2024
Collaborator

@gasche
Comment options

gasche Nov 30, 2024
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants