4 ms·
HOW is it possible? Imagine I have a file with lines 10 and 150 changes. How do you commit just one without some form of index (or alike)?
by WhyNotHugo 9y ago
HOW is it possible?
Imagine I have a file with lines 10 and 150 changes. How do you commit just one without some form of index (or alike)?
- kazinator 9y ago> or alike Well, that's the weasel word. In my grandparent comment, I proposed the "alike", didn't I? Nowhere did I say, just remove the index from Git, but don't replace its functionality with any other representation or mechanism. In git, we can do that today in such a way that the index is only temporarily involved: $ git commit --patch ... interactively pick out the change you want ... $ # now you have a commit with just that change It is not some Law of Computer Science that the above scenario requires something called an "index", which is a big archive holding all of the files in the repo, where these changes are first "staged" before migrating into a commit.