4 ms·
By default, the top (current) commit acts like a staging area and in fact is implemented as a dirty working tree in git. Commits start live without a descripti
by Filligree 1y ago
By default, the top (current) commit acts like a staging area and in fact is implemented as a dirty working tree in git.
Commits start live without a description, and can’t be pushed without adding one. jj commit names the current commit and creates a new empty, unnamed commit on top, which effectively is precisely git’s behaviour.
I implore you to try it. In practice the distinction just doesn’t matter, except it’s one less concept to keep track of, and jj allows you to make up other workflows if you want.
- 1718627440 1y agoSure, sometimes I want to work with a WIP commit and then I'm just doing that in git. I think functionally of the stage is about the UI, so keeping it separate is kind of the point. I find that useful, as I can use both approaches, not sure how its better if jj can just use one? > to ask why they do this. This was what I was trying to explain. To me the feature is needing to manually mark every line to be committed. If I need to split the commit I'm already not paying that much attention.
- riwsky 1y agojj’s workflow isn’t about being careless with commits—it’s about time-shifting that care to when it’s most convenient. You’d split the commit later for the same reasons you wouldn’t want your text editor to force manually marking each line to save to disk.