4 ms·
Thanks for the explanation! For the defense of git add and the index, I actually personally enjoy it. I discovered git add -p recently, and it's quite nice. I
by ygouzerh 1y ago
Thanks for the explanation!
For the defense of git add and the index, I actually personally enjoy it. I discovered git add -p recently, and it's quite nice.
It's like a way to say: let's prepare a commit with only this part of the file, but not yet this one as it's not yet finished.
For example, you can git add -p only the dependencies of a package.json, push that so others have it, and continue working on the scripts part.
I use often as well the index in order to have more granular commits that follows well Conventional Commits, when I want to have a `docs:...` for the readme update and a `feat: ...` for the src change
jj looks interesting, I will take a look!
- steveklabnik 1y agoI love the index and git add -p too, jj does thus far better than git imho. You just have to realize that the index is a commit, not its own separate feature.
- BeetleB 1y ago> For the defense of git add and the index, I actually personally enjoy it. I'm not criticizing it. In fact, I'm pointing out how, if you like the index/staging workflow, you can have it in jj with much more power (your index is version controlled). Oh, if you thought this line was the criticism: > After I'd been using jj, having a separate concept called "index" and a separate concept called "stash" suddenly seemed ridiculous. I'm not saying the index/stash workflow is ridiculous. I'm saying that having them as separate constructs, and giving them names, is silly. The index need not be distinct from your overall graph.