this post was submitted on 11 Dec 2024
41 points (93.6% liked)
Programming
17661 readers
216 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities [email protected]
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
First experience with #jj #jujitsu
I tried the equivalent of
git add -p
(jj squash -i
).git add --interactive
(which I find much more complicated and less productive)e
key ingit add -p
) which I use a lot to split debug statements from real workI generated a conflict (as I expected)
jj undo
did not worked (I have not been able to undo thejj squash
that introduced the conflictVery not impressed so far. Fortunately it was a test repo.
I don't think the builtin diff editor can do this, but you can set a different diff editor than the builtin one: https://github.com/martinvonz/jj/blob/main/docs/config.md#editing-diffs
edit: but wait, debug statements? Are they mixed in on the same line as the real code? The builtin diff editor can pick changes per line.
jj evolog to show how a single change evolved including the previous commit that didn't have the conflict yet, if that's what you mean.
If you did something afterwards, the operation you undo will no longer be the squash. Look at jj op log to see which one is the correct one to undo.