squash vs edit workflow: what "reified" them? #6792
-
I have read Steve's book on Jujutsu, spent some weeks using Looking back to what Steve wrote, I now see why people would recommend using Hence my question: how did we end up here? As in, why are we now talking about a "squash workflow" or "edit workflow". In a way, what I do is slightly different to these, since I cannot "just" do these little ceremonies cleanly. I have to manage my mess somehow because that's how it always end up and I would like to label that properly so that it can be later referenced easily. In any case, I will spend some time sharing my draft for proof reading to make sure I am not yapping misinformation. @steveklabnik I hope you don't mind me pinging you. Thank you for writing the book :) |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
I think this is just a natural consequence of jj automatically committing all changes. When you want to amend a revision, you can run But, for many reasons, you may want to make changes without immediately amending them into the revision you ultimately want to update. So, you instead start with |
Beta Was this translation helpful? Give feedback.
-
I haven't read the book you are referring to (although I don't know since there's no link), but I think it should be made clear that you can also use |
Beta Was this translation helpful? Give feedback.
-
I don't mind you pinging me but I'm a bit bad with notifications sometimes, sorry bout that!
When I talk to people about their workflows, these are the two most common that come up. jj has a lot of flexibility, but these two just seem to be pretty common. |
Beta Was this translation helpful? Give feedback.
-
The two workflows talk about one thing: how to commit. In my way, I use I'm working on hj, which is a toolbox for jj, hope to gain a star if you like! (docs are wip) |
Beta Was this translation helpful? Give feedback.
-
I wish I could spend some time to do a summary and add closing thoughts, but right now my brain is just not working for a task like that. In the meantime, I think Jenning’s answer is the most detailed, which I’ll will mark as being the "correct" answer for the time being, even though Steve’s and Gaojunran’s point in the same direction. Thank you all for your time :) |
Beta Was this translation helpful? Give feedback.
I think this is just a natural consequence of jj automatically committing all changes.
When you want to amend a revision, you can run
jj edit REV
. Any changes you make to the working copy are immediately (on next jj invocation) amended into the working copy commit and descendants are rebased on top. This is "the edit workflow" because it starts by runningjj edit
on the revision you intend to amend.But, for many reasons, you may want to make changes without immediately amending them into the revision you ultimately want to update. So, you instead start with
jj new REV
, giving you a clean working copy where you can make and discard changes. When you're happy with them, you runjj squash
t…